Answer the question
In order to leave comments, you need to log in
What's the fastest way to save images by URL?
There is an array with links to pictures. It is necessary to shove them into the archive as quickly as possible.
At the moment it is done like this:
for item in datas:
iitem = item.replace('\\','')
resource = urllib2.urlopen(item)
out = open('img+'+str(iterat)+'.jpg', 'wb+')
out.write(resource.read())
out.close()
zf.write('img+'+str(iterat)+'.jpg')
os.remove('img+'+str(iterat)+'.jpg')
iterat+=1
zf.close
Answer the question
In order to leave comments, you need to log in
here
https://habrahabr.ru/post/275595/
start withfrom multiprocessing import Pool
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question