Created
February 27, 2018 11:03
-
-
Save aavrug/ecb06471886ccf15f9a3f386a805ebd8 to your computer and use it in GitHub Desktop.
Download files from URL
This file contains hidden or 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
def get_resume(): | |
import urllib | |
resumes = ['url1', 'url2'] | |
i = 1 | |
for resume in resumes: | |
name = 'Resume'+str(i) | |
ext = resume[-4:] | |
ext = ext.replace('.', '') | |
file = urllib.URLopener() | |
file.retrieve(r, "/tmp/resumes/"+name+"."+ext) | |
i = int(i)+1 | |
return 'Downloaded successfully!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment