code: def filename_from_url(url, path=None):
      
      r = requests.get(url, stream=True)
      if 'Content-Disposition' in r.headers:
          filename = re.findall(r'filename=([^;]+)',
                                r.headers['Content-Disposition'])[0].strip('"\"')
      else:
          filename = os.path.basename(urllib.parse.urlparse(url).path)
      return filename
docs: Parses a URL to determine a file name.
  
      Parameters
      ----------
      url : str
          URL to parse.