pyguymer3.download_stream

pyguymer3.download_stream(sess, url, /, *, cookies=None, headers=None, timeout=10.0, verify=True)[source]

GET a URL and return the binary stream

This function performs a HTTP GET operation on a URL and returns the content as a biinary stream.

Parameters:
  • sess (requests.sessions.Session) – the requests session to use

  • url (str) – the URL

  • cookies (dict, optional) – the cookie jar

  • headers (dict, optional) – extra headers to send

  • timeout (float, optional) – the timeout of the GET request

  • verify (bool, optional) – verify the server’s certificates

Returns:

respFalse if unsuccessful or a bytes sequence if successful

Return type:

bool, bytes

Notes

Copyright 2017 Thomas Guymer [1]

References