Closed abrarmusa closed 2 weeks ago
Thank you for raising this issue. Could you try the following to see if your Chrono24 request continues to fail?
import requests
headers = {
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"accept-language": "pt-PT,pt;q=0.9,en-US;q=0.8,en;q=0.7",
"cookie": "uid=9c718efe-dcca-4e71-b92d-c3dd7b7f06cc",
"referer": "https://a3853408329f84107a5d2b90c11d7c4b.safeframe.googlesyndication.com/",
"sec-ch-ua": '" Not A;Brand";v="99", "Chromium";v="98", "Google Chrome";v="98"',
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": '"Windows"',
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"user-agent": "Mozilla/5.0 (Windows NT 8.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36",
}
response = requests.get('https://www.chrono24.com/enicar/sherpa--mod2067.htm?dosearch=true&query=Enicar+Sherpa&goal_suggest=1', headers=headers)
response.raise_for_status()
it works locally but fails on digital ocean
when the same request is done from digital ocean:
{
"error": "403 Client Error: Forbidden for url: https://www.chrono24.com/enicar/sherpa--mod2067.htm?dosearch=true&query=Enicar+Sherpa&goal_suggest=1"
}
Unfortunately, if the code snippet I provided still causes this issue, it is beyond the scope of this project. If the error is specific to chrono24
, feel free to raise this issue again.
I have tried hosting the lib as a flask app as:
When the app is run locally, it works great but when i host the app, it always outputs:
Retrying request... Attempt #1. Retrying request... Attempt #2. Retrying request... Attempt #3. Retrying request... Attempt #4. Retrying request... Attempt #5. Retrying request... Attempt #6. Retrying request... Attempt #7. Failed to execute request.