I want to pass an Authentication object when creating a get request in requests_html. Also want to pass a file path for the certificate. This is what I have so far.
def get_url():
s = HTMLSession()
try:
response = s.get(url)
except Exception as e:
logging.exception('Could not send get request: {}'.format(e))
response.html.render()
return response
To pass an Authentication object and a file path for the certificate when creating a get request in requests_html, you can use the auth and verify keyword arguments, respectively. Here is an example of how to do this:
In this example, auth is an Authentication object and cert_path is the file path to the certificate.