[Tutor] mutiply file download
Dima Kulik
dexternet89 at mail.ru
Fri Dec 25 04:12:51 EST 2015
Hi to all.
Can you tell me, how can I make an asynchronous file downloading?
I have a list of links from where to get files, but I'd like to save time and make all downloads parallel.
At the moment I make download as:
import urllib
urls={"skype.msi": "http://www.skype.com/go/getskype-msi",
"java.exe": "http://javadl.sun.com/webapps/download/AutoDL?BundleId=113219",
"acrobat_reader.exe":"http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1500920069/AcroRdrDC1500920069_en_US.exe"}
Dir = "c:\\download\\"
for key, val in urls.items():
urllib.urlretrieve(val,Dir+key)
print key+" was downloaded to "+Dir
How can i download files in parallel streams?
Thanks in advance.
--
Dima Kulik
More information about the Tutor
mailing list