code: def _GetBetweenQEqualsAndAmpersand(self, url):
      
      # Make sure we're analyzing the query part of the URL.
      _, _, url = url.partition('?')
      # Look for a key value pair named 'q'.
      _, _, url = url.partition('q=')
      if not url:
        return ''
  
      # Strip additional key value pairs.
      url, _, _ = url.partition('&')
      return url
docs: Retrieves the substring between the substrings 'q=' and '&'.
  
      Args:
        url (str): URL.
  
      Returns:
        str: search query, the value between 'q=' and '&'  or None if no query
        was found.