This commit is contained in:
parent
625c2c2af0
commit
85e3d65f2a
@ -126,7 +126,15 @@ def search_ygg(query, multi, full):
|
|||||||
if multi:
|
if multi:
|
||||||
ygg_params["option_langue:multiple[]"] = "4"
|
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(
|
html = bs4.BeautifulSoup(
|
||||||
req.text,
|
req.text,
|
||||||
"html.parser",
|
"html.parser",
|
||||||
|
Loading…
Reference in New Issue
Block a user