Feb-21-2018, 04:36 AM
I saved the Response object as an html file and opened it in my browser. Here's the code I used to make the request:
Thanks for your help.
def get_response(url): """Obtains Response object from page at url, with error-checking. :url: Url accessed. :returns: Response object. """ try: response = requests.get(url, headers=HEADER, timeout=TIMEOUT) print("Response code: {}.".format(response.status_code)) try: response.raise_for_status() except Exception as HTTPerror: print("HTTP error on url {}: {}.".format(url, HTTPerror)) return response except Exception as error: print("Error in get_response(): {}.".format(error))Would loading the response object into a Python script permit me to access all of its methods and attributes, now that I've saved it as an html file using "bw" and encode("utf-8). If that's the case, I can just upload the object somewhere and give you a password to download it.
Thanks for your help.