code: def get_url_filemeta(url):
      
      parsed_url = try_parse_url(url)
  
      if parsed_url is None:
          return None
      if parsed_url.scheme.startswith('ftp'):
          return get_ftp_filemeta(parsed_url)
  
      url = parsed_url.geturl()
      try:
          r = requests.get(url, stream=True, allow_redirects=True, timeout=5)
          remote_size = r.headers.get('Content-Length', -1)
          return dict(url=url, hostname=parsed_url.hostname, path=parsed_url.path,
                      username=parsed_url.username, remote_size=remote_size,
                      filename=os.path.basename(parsed_url.path))
      except ConnectionError:
          return None
      except (InvalidURL, InvalidSchema, InvalidHeader, MissingSchema):
          return None
      return None
docs: Request HTML for the page at the URL indicated and return the url, filename, and remote size
  
      TODO: just add remote_size and basename and filename attributes to the urlparse object
            instead of returning a dict
  
      >>> sorted(get_url_filemeta('mozilla.com').items())
      [('filename', ''),
       ('hostname', 'mozilla.com'),
       ('path', ''),
       ('remote_size', -1),
       ('url', 'http://mozilla.com'),
       ('username', None)]
      >>> sorted(get_url_filemeta('https://duckduckgo.com/about?q=nlp').items())
      [('filename', 'about'),
       ('hostname', 'duckduckgo.com'),
       ('path', '/about'),
       ('remote_size', -1),
       ('url', 'https://duckduckgo.com/about?q=nlp'),
       ('username', None)]
      >>> 1000 <= int(get_url_filemeta('en.wikipedia.org')['remote_size']) <= 200000
      True