Fix AW,GH

This commit is contained in:
UrloMythus
2026-02-06 11:09:06 +01:00 Unverified
parent 12ef33247b
commit bafd7e2d07
2 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -52,6 +52,7 @@ showname_replace = {
"Shippuuden": "Shippuden", "Shippuuden": "Shippuden",
" ": "+", " ": "+",
"Solo+Leveling+2": "Solo+Leveling+2:", "Solo+Leveling+2": "Solo+Leveling+2:",
"Case+Book": "Casebook",
"-": "" "-": ""
} }
async def security_cookie (response): async def security_cookie (response):
@@ -166,7 +167,7 @@ async def animeworld(streams,id,client):
async def test_animeworld(): async def test_animeworld():
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 = "kitsu:12:1" # This is an example ID format test_id = "kitsu:49323:1" # This is an example ID format
results = await animeworld({'streams': []},test_id, client) results = await animeworld({'streams': []},test_id, client)
print(results) print(results)
+5 -3
View File
@@ -42,8 +42,10 @@ async def search(clean_id,client):
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('li')) soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('li'))
li_tags = soup.find_all('li') li_tags = soup.find_all('li')
for tag in li_tags: for tag in li_tags:
if 'supervideo' in tag['data-link']: if tag.get('data-link'):
href = 'https:' + tag['data-link'] if 'supervideo' in tag.get('data-link'):
href = 'https:' + tag['data-link']
return href
return href return href
@@ -66,7 +68,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 = "tt12300742" # This is an example ID format test_id = "tt7181546" # This is an example ID format
results = await guardahd({'streams': []},test_id, client) results = await guardahd({'streams': []},test_id, client)
print(results) print(results)