pyguymer3.download_text¶
- pyguymer3.download_text(sess, url, /, *, cookies=None, debug=True, ensureNFC=True, headers=None, timeout=10.0, verify=True)[source]¶
GET a URL and return the text
This function performs a HTTP GET operation on a URL and returns the content as text, and optionally ensure that the Unicode encoding is NFC.
- Parameters:
sess (requests.sessions.Session) – the
requestssession to useurl (str) – the URL
cookies (dict, optional) – the cookie jar
debug (bool, optional) – print debug messages
ensureNFC (bool, optional) – ensure that the Unicode encoding is NFC
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:
text – False if unsuccessful or a str if successful
- Return type:
Notes
Copyright 2017 Thomas Guymer [1]
References