Created
March 29, 2021 11:05
-
-
Save tkoz0/257e7d1875d4860ed79d5c384457ce42 to your computer and use it in GitHub Desktop.
Something I wrote a long time ago for downloading problem PDFs from uva.onlinejudge.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
url_base = 'https://uva.onlinejudge.org/external/' | |
volumes = list(range(1,1+17)) + list(range(100,1+133)) | |
for volume in volumes: | |
os.system('mkdir %d'%volume) | |
os.chdir('%d'%volume) | |
for problem in range(100): | |
url = url_base + '%d/%d%02d.pdf'%(volume,volume,problem) | |
os.system('wget "%s"'%url) | |
os.chdir('..') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment