code: def get_name_from_url(url):
      
  
      head, tail = ntpath.split(url)
      params_index = tail.find("&")
      if params_index != -1:
          tail = tail[:params_index]
      params_index = tail.find("?")
      if params_index != -1:
          tail = tail[:params_index]
  
      basename = ntpath.basename(url)
      params_b_index = basename.find("&")
      if params_b_index != -1:
          basename = basename[:params_b_index]
      return tail or basename
docs: get the filename from a url 
      url = http://abc.com/xyz.txt
      get_name_from_url(url) -> xyz.txt