title: How can I download images from a list of links?
body: <p>I have a list of links to images (about 5000 lines), and I need to know how I can download all it fast. Please help me with my code:</p>
  
  <pre><code>import concurrent.futures
  import urllib.request
  
  catname = 'amateur'
  
  def getimg (count, endcount):
      while (count &lt; endcount):
        urllib.request.urlretrieve(URLS[count], catname+'/images/'+catname+str(count)+'.jpg')
        URLS[count] = catname+'/images/'+catname+str(count)+'.jpg'
        count = count + 1
  
  with concurrent.futures.ThreadPoolExecutor(max_workers=50) as e:
      e.submit(getimg, 0, 5000)
  </code></pre>
  
  <p>It works fine but slow.</p>