Feb-02-2021, 08:31 PM
Hi
I'm trying to connect to the following page
https://www.happyvisio.com
This server requires authentification.
When I connect from a web browser, the response is a page to enter user and password information.
When I connect with requests, the request fails
I also tried command as
What else do you advise me to try?
Arbiel
I'm trying to connect to the following page
https://www.happyvisio.com
This server requires authentification.
When I connect from a web browser, the response is a page to enter user and password information.
When I connect with requests, the request fails
import requests r = requests.get('https://www.happyvisio.com/') r.status_code 403 r.text '<html><body><h1>403 Forbidden</h1>\nRequest forbidden by administrative rules.\n</body></html>\n' r.headers {'content-length': '93', 'cache-control': 'no-cache', 'content-type': 'text/html', 'connection': 'close'}I understand that the request send by requests is not the same as the one sent by the browser. How can I have requests send the same request ?
I also tried command as
requests.get('https://www.happyvisio.com', auth=HTTPBasicAuth(user, mdp)) requests.get('https://www.happyvisio.com', auth=HTTPDigestAuth(user, mdp))with no avail.
What else do you advise me to try?
Arbiel