From bf917c382b6ce0c628cbb19965776cf208756ac8 Mon Sep 17 00:00:00 2001 From: UrloMythus Date: Thu, 5 Sep 2024 16:14:21 +0200 Subject: [PATCH] Test for Tantifilm --- Src/API/tantifilm.py | 10 ++++++---- run.py | 3 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Src/API/tantifilm.py b/Src/API/tantifilm.py index f411276..edec433 100644 --- a/Src/API/tantifilm.py +++ b/Src/API/tantifilm.py @@ -165,7 +165,6 @@ async def true_url(protect_link,client): response = await client.get(protect_link, proxies=proxies, allow_redirects=True, impersonate = "chrome120") else: response = await client.get(protect_link, allow_redirects=True, impersonate = "chrome120") - link = response.url if response.status_code == 200: @@ -182,7 +181,10 @@ async def true_url(protect_link,client): if match: # Create real link (match[0] includes all matched elements) url =f'https://d000d.com{match[1]}' - rebobo = await client.get(url, headers=headers, allow_redirects=True, impersonate = "chrome120") + if "HF" == "1" : + rebobo = await client.get(url, headers=headers, allow_redirects=True, impersonate = "chrome120",proxies= proxies) + else: + rebobo = await client.get(url, headers=headers, allow_redirects=True, impersonate = "chrome120") real_url = f'{rebobo.text}123456789{match[2]}{real_time}' print("MammaMia: Found results for Tantifilm") return real_url @@ -266,7 +268,7 @@ async def tantifilm(imdb,client,TF_FAST_SEARCH): return None - +''' async def test_animeworld(): from curl_cffi.requests import AsyncSession async with AsyncSession() as client: @@ -278,5 +280,5 @@ if __name__ == "__main__": import asyncio asyncio.run(test_animeworld()) - +''' diff --git a/run.py b/run.py index b0b541d..14e6bd7 100644 --- a/run.py +++ b/run.py @@ -224,8 +224,7 @@ async def addon_stream(request: Request,config, type, id,): SC_FAST_SEARCH = provider_maps['SC_FAST_SEARCH'] url_streaming_community,url_720_streaming_community,quality_sc = await streaming_community(id,client,SC_FAST_SEARCH) if url_streaming_community is not None: - response = await client.get("https://api.ipify.org?format=json") - print(f"StreamingCommunity Found Results for {id}",response.json()) + print(f"StreamingCommunity Found Results for {id}") if quality_sc == "1080": streams['streams'].append({'title': f'{HF}StreamingCommunity 1080p Max', 'url': url_streaming_community}) streams['streams'].append({'title': f'{HF}StreamingCommunity 720p Max', 'url': url_720_streaming_community})