Skip to content

A personal submission codeforces parser for CF, parsed by individual contests.The user is prompted for the username and has the flexibilty to parse last 'n' contests he participated in CF.

License

Notifications You must be signed in to change notification settings

JanaSabuj/ParseMyCF-contest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ParseMyCf-contest

A personal submission parser for CF, parsed by individual contests.

Inspiration Why work hard when Python is your pet ?

What it does

  • You are prompted the username
    • You are shown the no of contests the user has participated
    • You enter the no of recent contests you want to parse
  • The script starts scraping from the most recent contests
  • For every contest, A Folder is created having the format (name + username)
    • Each folder has all the submissions with their proper extensions.
    • Each problem has all its attempts(WA,AC,TLE,RE,ME) in serial order separated by appropriate delimiters
    • A contest-info .txt file is also created having all the miscellaneous information about the user's performance like - Rating Change, New rating, Rank, Problems successfully solved etc.
  • If a folder was previously present i.e a contest was previously parsed by this scraper, it'll ignore the contest and move one to the next unfinished contest

Youtube demo

My first youtube tutorial

Script prompting the username

1

Script prompting for no of contests

cf2

What to do

  • Download only the cf.py file
  • Install latest version of python (add to PATH) if not already installed
  • Pip install all the below mentioned modules and dependencies
  • Place the script in a folder where you want all the different folders of contest
  • Run python3 cf.py or python cf.py as suitable
  • Bonus - If you place it in a git initialised repository, after the script finishes, you can simply commit all the changes and all your contest-codes will be pushed to github
  • An active internet connection while the script parses

Middle of file parsing (has scraped 1 contest till now..)

45

Middle of parsing(has scraped 2 contests till now..)

4545

End of parsing

4564

Peek inside the directory structure of a contest

101 456456

Some users may encounter a https error. Here's the walkthrough.

You need to change all the https to http and delete the argument verify = True from every get request. verify-true-git

The highlighted parts show the https and verify=True clauses. They need to be dealt with as described above the pic.

Requirements

  • Modules

    • os
    • sys
    • requests
    • re
    • bs4 (BeautifulSoup)
    • time
  • User Requiremets

    • codeforces-user-id of any person
  • Python Version

    • 3 or above
  • Active internet when py - script runs

  • The terminal (required for input) shows log as the script runs

About

A personal submission codeforces parser for CF, parsed by individual contests.The user is prompted for the username and has the flexibilty to parse last 'n' contests he participated in CF.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages