Guardaserie fix

This commit is contained in:
UrloMythus
2025-06-05 12:39:30 +02:00 Unverified
parent 104af0bced
commit 81d566a423
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ async def test_script():
from curl_cffi.requests import AsyncSession from curl_cffi.requests import AsyncSession
async with AsyncSession() as client: async with AsyncSession() as client:
# Replace with actual id, for example 'anime_id:episode' format # 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) results = await guardaserie(test_id, client)
print(results) print(results)
+3 -3
View File
@@ -10,7 +10,7 @@
# if detect(some_string): # if detect(some_string):
# unpacked = unpack(some_string) # unpacked = unpack(some_string)
# #
from fake_headers import Headers
"""Unpacker for Dean Edward's p.a.c.k.e.r""" """Unpacker for Dean Edward's p.a.c.k.e.r"""
import re import re
from bs4 import BeautifulSoup, SoupStrainer from bs4 import BeautifulSoup, SoupStrainer
@@ -133,12 +133,12 @@ class UnpackingError(Exception):
pass pass
random_headers = Headers()
async def eval_solver(stream_link,proxies, ForwardProxy, client): async def eval_solver(stream_link,proxies, ForwardProxy, client):
try: try:
print(ForwardProxy + stream_link) headers = random_headers.generate()
headers = {}
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"
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") response = await client.get( ForwardProxy + stream_link, allow_redirects=True, timeout=30, headers = headers, proxies = proxies, impersonate = "chrome124")