code: def getfile2(url, auth=None, outdir=None):
      
      import requests
      print("Retrieving: %s" % url)
      fn = os.path.split(url)[-1]
      if outdir is not None:
          fn = os.path.join(outdir, fn)
      if auth is not None:
          r = requests.get(url, stream=True, auth=auth)
      else:
          r = requests.get(url, stream=True)
      chunk_size = 1000000
      with open(fn, 'wb') as fd:
          for chunk in r.iter_content(chunk_size):
              fd.write(chunk)
docs: Function to fetch files using requests
  
      Works with https authentication