https://99acres.com with python requests module but it just keeps processing and does not stop while the same website works fine on browser.
After 10 min it gives an error
ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
Following is my code:
import requests
url = '
https://99acres.com'
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0'
}
r = requests.get(url,headers = headers)
I have tried the following:
* giving user-agent in headers.
* copying the request from the browser inspect as Curl and then converted it to python from online website.
Unfortunately nothing seems to work.
Is it possible to connect with this website from python request module?
0 comments:
Post a Comment
Thanks