Asynchronously get and store images in python
The following code is a sample of non-asynchronous code, is there any way
to get the images asynchronously?
import urllib
for x in range(0,10):
urllib.urlretrieve("http://test.com/file %s.png" % (x), "temp/file
%s.png" % (x))
I have also seen the Grequests library but I couldn't figure much if that
is possible or how to do it from the documentation.
No comments:
Post a Comment