Python script to scrap input output from problems of Codeforces Contest
- bs4
- requests
- html5lib
command :
pip3 install bs4 requests html5lib
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