Skip to content

Python script to scrap input output from problems of Codeforces Contest and auto run given test cases

Notifications You must be signed in to change notification settings

abhakta-47/CP-Scrapper

Repository files navigation

CP-Scrapper

Python script to scrap input output from problems of Codeforces Contest

Requiremets :

  1. bs4
  2. requests
  3. html5lib

command :

 pip3 install bs4 requests html5lib

How to Use :

1. changing settings.json :

  • contest url : for full contest in settings.json change its value to contest url
 {
  "contest_url": "https://codeforces.com/contest/1374",
  "problem_url": ""
 }
  • problem url : for particular problem in settings.json change its value to problem url
    leave contest_url empty
 {
  "contest_url": "",
  "problem_url": "https://codeforces.com/contest/1374/problem/B"
 }

2. source_location.txt : in here put full path where sourc .cpp will be collected for testing, file names should be problem code name ( eg.A.cpp, B.cpp etc) e.g.
(for Linux)

~/projects/CompetitiveCodingMyPractices/codeforces/practice/div3 661

(for Windows)

C:\Users\ARNAB BHAKTA\Documents\cs\CP\codeforces\challanges\div2 654

3. then run main.py

4. wait for input : propmt

5. in the prompt enter problem code you want to check
let you entered A, then A.cpp will be collected from the dir specified in source_location.txt, compiled and run against test cases of problem code A.

6. result should be saved in runtime/report.html. Open with browser to see results.

Most importantly

Happy coding 😊 and best of luck 👍

About

Python script to scrap input output from problems of Codeforces Contest and auto run given test cases

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages