remotes/1693045480750635534/spooky-22
Aevann1 2021-09-29 21:02:55 +02:00
parent ae5e82f076
commit 5a47b60c8c
1 changed files with 1 additions and 1 deletions

View File

@ -362,7 +362,7 @@ def get_post_title(v):
#mimic chrome browser agent
headers = {"User-Agent": f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"}
try: x = requests.get(url, headers=headers)
try: x = requests.get(url, headers=headers, timeout=5)
except BaseException: return {"error": "Could not reach page"}, 400
if not x.status_code == 200: return {"error": f"Page returned {x.status_code}"}, x.status_code