code: def get_urlinfo(info):
          
          # If info is a whole URL pick out the query or fragment part
          if '?' in info or '#' in info:
              parts = urlparse(info)
              scheme, netloc, path, params, query, fragment = parts[:6]
              # either query of fragment
              if query:
                  info = query
              else:
                  info = fragment
          return info
docs: Pick out the fragment or query part from a URL.
  
          :param info: A URL possibly containing a query or a fragment part
          :return: the query/fragment part