request url
flake8 / flake8_py3 (push) Has been cancelled
Build / main (3.10) (push) Has been cancelled
Build / admin (3.10) (push) Has been cancelled
Check vulnerabilities / vulnerabilities (push) Has been cancelled

This commit is contained in:
KatKatKateryna
2024-09-26 17:00:02 +01:00
parent 8f845c95bb
commit 4097aff759
+5 -3
View File
@@ -200,9 +200,11 @@ def landing_page():
browser_list = ["Chrome", "Safari", "Firefox", "Edg/", "Trident/"]
print(agent)
if agent is None:
return error_screen("User-Agent not specified")
elif "YaBrowser/" in agent or "yandex" in agent.lower():
request.url += f"&userAgent={agent}"
CONFIG = get_config(request=request)
api_ = API(CONFIG, OPENAPI)
if agent is not None and ("YaBrowser/" in agent or "yandex" in agent.lower()):
raise ValueError("Your browser is not supported.")
for br in browser_list:
if br in agent: