Created
February 17, 2018 20:38
-
-
Save ajayguru2/16092b9359da57aad6275fc087e563ab to your computer and use it in GitHub Desktop.
For downloading the solutions to the famous CLRS quickly and without any hassle. Save your time and willpower
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
# http://sites.math.rutgers.edu/~ajl213/CLRS/Ch1.pdf | |
import requests | |
count = int(input("Enter the Chapter number")) | |
try: | |
url = "http://sites.math.rutgers.edu/~ajl213/CLRS/Ch"+ str(count) + ".pdf" | |
r = requests.get(url, allow_redirects=True) | |
open('CLRS:' + 'chapter' + str(count), 'wb').write(r.content) | |
print("file successfully saved!!") | |
except Exception as e: | |
print("Network Error") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment