Coder Social home page Coder Social logo

codeforcesapi's Introduction

Codeforces API

This is my attempt at some python web scraping. I will scrape the data from the Codeforces website and this can be accessed by making an API call to a REST endpoint I created using flask.

The motive of this project is to aid a CP specific editor. I've been making some prototypes of it using PyQt6 on the orange/editor branch. Take a look at that if it interests you.

Setup

  • Clone the repository and access the project directory
      git clone https://github.com/Abhijna-Raghavendra/CodeforcesAPI.git
      cd CodeforcesAPI
  • Create and activate your virtual environment

    Make sure you have python installed in your computer before proceeding

      python3 -m venv virtenv
      # In Windows cmd
      virtenv\Scripts\activate.bat
      # In Windows PowerShell
      virtenv\Scripts\Activate.ps1
      # In Linux or MacOS
      source virtenv/Scripts/activate
  • Install required dependencies
    (virtenv)
      pip install -r requirements.txt
  • Run the flask server
    (virtenv)
      python api.py

Usage

Once the flask server is up and running on localhost:5000, open a browser window and visit http://127.0.0.1:5000/scrape/{question}

The {question} must be valid and of the form "1729-A", where a "-" seperates the letter from the number.

Enjoy!! ❤️

codeforcesapi's People

Contributors

abhijna-raghavendra avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.