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