Skip to content

Codechef web crawler made using requests and beautiful soup.

Notifications You must be signed in to change notification settings

arhankundu99/codechef-crawler

Repository files navigation

README

These are the python scripts I use to fetch solutions, editorials and user profile on codechef

Setup

You can clone this repository using https://github.com/arhankundu99/codechef-crawler.git
Scripts are written in python3. So you should have a python3 interpreter

Requirements

You can easily install all requirements by just using the following command-
$ pip install -r requirements.txt

Usage

Get user specific details

from user import User

# create an object of User class
user = User('arhankundu99')
user.download_all_codes(contest_name)
# Download codes of the user contest-wise in the SOLUTIONS folder

user.get_ratings()
# returns the ratings of long challenges, lunchtimes and cook-off challenges of the user

user.get_profile()
# returns user related profile

user.has_solved(problem_code)
# returns true if the user has solved the problem

Get editorials and schedule of future contests

import crawler
crawler.get_schedule()
# returns future contests

crawler.get_editorials(contest_name)
# Downloads the editorials for all the problems related to the contest in the EDITORIALS folder

TO-DO

  1. Add Multithreading for faster downloading of solutions
  2. Add rating comparator for 2 users

About

Codechef web crawler made using requests and beautiful soup.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages