Created
October 16, 2023 16:13
-
-
Save tusqasi/b6cc91481863b1bc0147b5361a9b3343 to your computer and use it in GitHub Desktop.
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 requests | |
import multiprocessing | |
def get_paper_for_year(year): | |
data = requests.get( | |
f"https://gate.iitkgp.ac.in/documents/gatepapers/{year}/ec_{year}.pdf") | |
with open(f"/tmp/gate_paper/{year}.pdf", mode='wb') as fp: | |
fp.write(data.content) | |
pool = multiprocessing.Pool() | |
pool.map(get_paper_for_year,range(2002,2022)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment