From c2ccfe3cdd1ea064e708fb614831756fd77f0e99 Mon Sep 17 00:00:00 2001 From: UrloMythus Date: Sun, 14 Jul 2024 21:12:19 +0200 Subject: [PATCH] Fix for cool --- config.json | 2 +- cool.py | 14 +++++++++----- run.py | 1 - 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/config.json b/config.json index caa4f12..16dd378 100644 --- a/config.json +++ b/config.json @@ -15,7 +15,7 @@ "fast_search": "0" }, "Mysterius":{ - "enabled": "0" + "enabled": "1" } }, "General":{ diff --git a/cool.py b/cool.py index 2d8777f..ba4c06e 100644 --- a/cool.py +++ b/cool.py @@ -9,8 +9,7 @@ def get_links(slug,season,episode,ismovie): headers = { "x-api-key": MYSTERIUS_KEY } - response = requests.get("https://mythus-ulala1243.hf.space/api/cookie", headers=headers) - print(response.text) + response = requests.get("https://mammamia-urlo-ulala12431.hf.space/api/cookie", headers=headers) Auths = response.json() Bearer = Auths.get('cookie') ap_session = Auths.get('auth') @@ -29,7 +28,11 @@ def get_links(slug,season,episode,ismovie): response = requests.get(f'https://altadefinizione-originale.com/api/post/urls/stream/{slug}',cookies=cookies,headers=headers) elif ismovie == 0: - response = requests.get(f'https://altadefinizione-originale.com/api/post/urls/stream/{slug}/{{season}}/{{episode}}',cookies=cookies,headers=headers) + print("HERE SEASON",season) + print("HERE EPISODE",episode) + request_url =f'https://altadefinizione-originale.com/api/post/urls/stream/{slug}/{season}/{episode}' + print(request_url) + response = requests.get(request_url,cookies=cookies,headers=headers) try: video_data = response.json() # Assuming this is the JSON response containing video streams @@ -109,8 +112,8 @@ def cool(imdb): ismovie = general[0] imdb_id = general[1] if ismovie == 0 : - season = int(general[2]) - episode = int(general[3]) + episode = int(general[2]) + season = int(general[3]) if "tt" in imdb: #Get showname @@ -122,6 +125,7 @@ def cool(imdb): slug = search_imdb(showname,tmdba) + print(ismovie) if ismovie == 1: season = None episode = None diff --git a/run.py b/run.py index ee80512..5f76a0a 100644 --- a/run.py +++ b/run.py @@ -7,7 +7,6 @@ import config import logging # Configure logging -logging.basicConfig(level=logging.DEBUG) FILMPERTUTTI = config.FILMPERTUTTI STREAMINGCOMMUNITY = config.STREAMINGCOMMUNITY