code: def get_filename_from_url(url):
      
      path = urlparse(url).path
      name = path[path.rfind('/')+1:]
      return name or None
docs: Get a filename from a URL.
  
      >>> from planet.api import utils
      >>> urls = [
      ...     'https://planet.com/',
      ...     'https://planet.com/path/to/',
      ...     'https://planet.com/path/to/example.tif',
      ...     'https://planet.com/path/to/example.tif?foo=f6f1&bar=baz',
      ...     'https://planet.com/path/to/example.tif?foo=f6f1&bar=baz#quux'
      ... ]
      >>> for url in urls:
      ...     print('{} -> {}'.format(url, utils.get_filename_from_url(url)))
      ...
      https://planet.com/ -> None
      https://planet.com/path/to/ -> None
      https://planet.com/path/to/example.tif -> example.tif
      https://planet.com/path/to/example.tif?foo=f6f1&bar=baz -> example.tif
      https://planet.com/path/to/example.tif?foo=f6f1&bar=baz#quux -> example.tif
      >>>
  
      :returns: a filename (i.e. ``basename``)
      :rtype: str or None