def _open_url ( url ) : response = requests . get ( url , stream = True ) if response . status_code != 200 : raise IOError ( "Unable to download {}, HTTP {}" . format ( url , response . status_code ) ) return response
does http reuesta return a filehandle python
Open a HTTP connection to the URL and return a file - like object .
def _open_url(url):
    """Open a HTTP connection to the URL and return a file-like object."""
    response = requests.get(url, stream=True)
    if response.status_code != 200:
        raise IOError("Unable to download {}, HTTP {}".format(url, response.status_code))
    return response