diff --git a/Src/API/animeworld.py b/Src/API/animeworld.py index e8a0909..7d4459e 100644 --- a/Src/API/animeworld.py +++ b/Src/API/animeworld.py @@ -52,6 +52,7 @@ showname_replace = { "Shippuuden": "Shippuden", " ": "+", "Solo+Leveling+2": "Solo+Leveling+2:", + "Case+Book": "Casebook", "-": "" } async def security_cookie (response): @@ -166,7 +167,7 @@ async def animeworld(streams,id,client): async def test_animeworld(): async with AsyncSession() as client: # 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) print(results) diff --git a/Src/API/guardahd.py b/Src/API/guardahd.py index 11e70b0..a05c489 100644 --- a/Src/API/guardahd.py +++ b/Src/API/guardahd.py @@ -42,8 +42,10 @@ async def search(clean_id,client): soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('li')) li_tags = soup.find_all('li') for tag in li_tags: - if 'supervideo' in tag['data-link']: - href = 'https:' + tag['data-link'] + if tag.get('data-link'): + if 'supervideo' in tag.get('data-link'): + href = 'https:' + tag['data-link'] + return href return href @@ -66,7 +68,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 = "tt12300742" # This is an example ID format + test_id = "tt7181546" # This is an example ID format results = await guardahd({'streams': []},test_id, client) print(results)