From d718d5ba773d0c252b3eeb893655c92181ec54d0 Mon Sep 17 00:00:00 2001 From: UrloMythus Date: Mon, 12 May 2025 15:58:03 +0200 Subject: [PATCH] Fixed StreamingCommunity due to url change --- Src/API/streamingcommunity.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Src/API/streamingcommunity.py b/Src/API/streamingcommunity.py index 7554718..8c07e51 100644 --- a/Src/API/streamingcommunity.py +++ b/Src/API/streamingcommunity.py @@ -91,7 +91,6 @@ async def search(query,date,ismovie, client,SC_FAST_SEARCH,movie_id): response = await client.get(ForwardProxy + query, headers = random_headers, allow_redirects=True, impersonate = "chrome124", proxies = proxies) print(response) response = response.json() - for item in response['data']: tid = item['id'] slug = item['slug'] @@ -106,7 +105,7 @@ async def search(query,date,ismovie, client,SC_FAST_SEARCH,movie_id): random_headers = headers.generate() random_headers['Referer'] = f"{SC_DOMAIN}/" random_headers['Origin'] = f"{SC_DOMAIN}" - response = await client.get ( ForwardProxy + f'{SC_DOMAIN}/titles/{tid}-{slug}', headers = random_headers, allow_redirects=True,impersonate = "chrome124", proxies = proxies) + response = await client.get ( ForwardProxy + f'{SC_DOMAIN}/it/titles/{tid}-{slug}', headers = random_headers, allow_redirects=True,impersonate = "chrome124", proxies = proxies) soup = BeautifulSoup(response.text, "lxml") data = json.loads(soup.find("div", {"id": "app"}).get("data-page")) version = data['version'] @@ -136,9 +135,9 @@ async def get_film(tid,version,client,MFP): random_headers['User-Agent'] = User_Agent random_headers['user-agent'] = User_Agent #Access the iframe - url = f'{SC_DOMAIN}/iframe/{tid}' + url = f'{SC_DOMAIN}/it/iframe/{tid}' if MFP == "1": - url = f'{SC_DOMAIN}/iframe/{tid}' + url = f'{SC_DOMAIN}/it/iframe/{tid}' quality = "Unknown" return url,quality response = await client.get(ForwardProxy + url, headers=random_headers, allow_redirects=True,impersonate = "chrome124", proxies = proxies) @@ -201,7 +200,7 @@ async def get_season_episode_id(tid,slug,season,episode,version,client): #Set some basic headers for the request #Get episode ID - response = await client.get(ForwardProxy + f'{SC_DOMAIN}/titles/{tid}-{slug}/stagione-{season}', headers=random_headers, allow_redirects=True, impersonate = "chrome124", proxies = proxies) + response = await client.get(ForwardProxy + f'{SC_DOMAIN}/it/titles/{tid}-{slug}/stagione-{season}', headers=random_headers, allow_redirects=True, impersonate = "chrome124", proxies = proxies) # Print the json got json_response = response.json().get('props', {}).get('loadedSeason', {}).get('episodes', []) for dict_episode in json_response: @@ -228,7 +227,7 @@ async def get_episode_link(episode_id,tid,version,client,MFP): url = f'{SC_DOMAIN}/iframe/{tid}?episode_id={episode_id}&next_episode=1' quality = "Unknown" return url,quality - response = await client.get(ForwardProxy + f"{SC_DOMAIN}/iframe/{tid}", params=params, headers = random_headers, allow_redirects=True, impersonate = "chrome124", proxies = proxies) + response = await client.get(ForwardProxy + f"{SC_DOMAIN}/it/iframe/{tid}", params=params, headers = random_headers, allow_redirects=True, impersonate = "chrome124", proxies = proxies) # Parse response with BeautifulSoup to get iframe source soup = BeautifulSoup(response.text, "lxml") @@ -355,7 +354,7 @@ async def test_animeworld(): from curl_cffi.requests import AsyncSession async with AsyncSession() as client: # Replace with actual id, for example 'anime_id:episode' format - test_id = "tt4772188" # This is an example ID format + test_id = "tt9218128" # This is an example ID format results = await streaming_community(test_id, client,"0","0") print(results)