def get_request(url):
try:<EOL><INDENT>LOG.info("<STR_LIT>", url)<EOL>response = urllib.request.urlopen(url)<EOL>if url.endswith('<STR_LIT>'):<EOL><INDENT>LOG.info("<STR_LIT>")<EOL>data = gzip.decompress(response.read())      <EOL><DEDENT>else:<EOL><INDENT>data = response.read()      <EOL><DEDENT>decoded_data = data.decode('<STR_LIT:utf-8>')<EOL><DEDENT>except HTTPError as err:<EOL><INDENT>LOG.warning("<STR_LIT>")<EOL>raise err<EOL><DEDENT>except URLError as err:<EOL><INDENT>LOG.warning("<STR_LIT>")<EOL>raise err<EOL><DEDENT>if '<STR_LIT>' in decoded_data:<EOL><INDENT>raise URLError("<STR_LIT>".format(url))<EOL><DEDENT>return decoded_data<EOL>
Return a requests response from url

    Args:
        url(str)

    Returns:
        decoded_data(str): Decoded response