A simple scrapper made in python for the purpose of downloading codeforce contests and problems as pdf
It allows downloading problem based on contest id, rating, difficulty adn tags
Sample PDF for CF Beta Round 13
You can download pdfs from all codeforces contest currently upto Codeforces Round #542 from here
- wkhtmltopdf
- pdfkit
- requests
- bs4
pip install requests
pip install pdfkit
pip install wkhtmltopdf
pip install bs4
- Show help
python scrapper.py -h
- Download contest problem from certain contest id 300 upto contest id 302
View help to know what switch -m, -l and -c are
python scrapper.py -m contest -l 300 -u 302
- Download problems with rating 1200-1300 order by solved
python scrapper.py -m p -t 1200-1300 -o solved
- Download problems with tag dp
python scrapper.py -m p -t dp
- Download problems with tag dp and binary search ordered by solved
Note: Enclose tags inside quotes if it is more than 1 word
python scrapper.py -m p -t dp -o solved
python scrapper.py -m p -t "binary search" -o solved
- Download all problems with tag dp ordered by rating
python scrapper.py -m p -t dp -o rating
- Download all problems with tag dp ordered by solved in ascending order
Change to -asc False to download in descending order
python scrapper.py -m p -t dp -o solved -asc True
- Download maximum of 10 problems with tag dp ordered by solved in ascending order
python scrapper.py -m p -t dp -o solved -asc True -n 10
- Download maximum of 10 problems with any tag ordered by solved in ascending order
python scrapper.py -m p -o solved -asc True -n 10
- Download maximum of 10 problems with any tag ordered by rating in ascending order
python scrapper.py -m p -o rating -asc True -n 10
Download wkhtmltopdf executable from here and set the path path of executable in scrapper.py file accordingly by updating path_wkhtmlpdf to path of wkhtmltopdf.exe
- Feature to download contest based on contest ID
- Feature to download problemset base on ratings, tags (In progress)