From 641563bb14aac6ae1e3e93a40fbaf44de1af0e39 Mon Sep 17 00:00:00 2001 From: Ghost <62809003+Ghost6446@users.noreply.github.com> Date: Tue, 30 Jan 2024 18:48:30 +0100 Subject: [PATCH] change headers --- Src/Api/page.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Api/page.py b/Src/Api/page.py index aa93a89..258dca7 100644 --- a/Src/Api/page.py +++ b/Src/Api/page.py @@ -11,10 +11,10 @@ from bs4 import BeautifulSoup def domain_version(): console.print("[green]Get rules ...") - req_repo = requests.get("https://raw.githubusercontent.com/Ghost6446/Streaming_comunity_data/main/data.json", headers={'user-agent': get_headers()}) + req_repo = requests.get("https://raw.githubusercontent.com/Ghost6446/Streaming_comunity_data/main/data.json") if req_repo.ok: - site_req = requests.get(f"https://streamingcommunity.{req_repo.json()['domain']}/").text + site_req = requests.get(f"https://streamingcommunity.{req_repo.json()['domain']}/", headers={'user-agent': get_headers()}).text soup = BeautifulSoup(site_req, "lxml") version = json.loads(soup.find("div", {"id": "app"}).get("data-page"))['version']