From 0093e036bdf3bc722933edf7917333ac24d8f274 Mon Sep 17 00:00:00 2001 From: UrloMythus Date: Thu, 5 Jun 2025 12:39:30 +0200 Subject: [PATCH] Guardaserie fix --- Src/API/guardaserie.py | 2 +- Src/Utilities/eval.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/API/guardaserie.py b/Src/API/guardaserie.py index c376321..d5b8a06 100644 --- a/Src/API/guardaserie.py +++ b/Src/API/guardaserie.py @@ -132,7 +132,7 @@ async def test_script(): from curl_cffi.requests import AsyncSession async with AsyncSession() as client: # Replace with actual id, for example 'anime_id:episode' format - test_id = "tt3148266:3:4" # This is an example ID format + test_id = "tt0460649:1:1" # This is an example ID format results = await guardaserie(test_id, client) print(results) diff --git a/Src/Utilities/eval.py b/Src/Utilities/eval.py index e0106fd..6697e80 100644 --- a/Src/Utilities/eval.py +++ b/Src/Utilities/eval.py @@ -10,7 +10,7 @@ # if detect(some_string): # unpacked = unpack(some_string) # - +from fake_headers import Headers """Unpacker for Dean Edward's p.a.c.k.e.r""" import re from bs4 import BeautifulSoup, SoupStrainer @@ -133,12 +133,12 @@ class UnpackingError(Exception): pass +random_headers = Headers() async def eval_solver(stream_link,proxies, ForwardProxy, client): try: - print(ForwardProxy + stream_link) - headers = {} + headers = random_headers.generate() headers["user-agent"] = "Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36" headers["User-Agent"] = "Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36" response = await client.get( ForwardProxy + stream_link, allow_redirects=True, timeout=30, headers = headers, proxies = proxies, impersonate = "chrome124")