Show url when failed
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2023-01-26 23:27:58 +01:00
parent 625c2c2af0
commit 85e3d65f2a

View File

@ -126,7 +126,15 @@ def search_ygg(query, multi, full):
if multi:
ygg_params["option_langue:multiple[]"] = "4"
req = session.get(f"https://{YGG_DOMAIN}/engine/search", params=ygg_params)
try:
req = session.get(f"https://{YGG_DOMAIN}/engine/search", params=ygg_params)
except requests.RequestException as e:
print(
f"Request failed. {e}\n"
f"https://{YGG_DOMAIN}/engine/search?{urllib.parse.urlencode(ygg_params)}"
)
return
html = bs4.BeautifulSoup(
req.text,
"html.parser",