From b0f3e4022cbae1e0cfeec9707121661779c2df37 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Mon, 26 Sep 2022 09:15:56 +0200 Subject: [PATCH] Fix streamingcommunity e animeunity --- channels/animeunity.py | 4 ++-- channels/streamingcommunity.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/channels/animeunity.py b/channels/animeunity.py index 261a8a25..95f21e50 100644 --- a/channels/animeunity.py +++ b/channels/animeunity.py @@ -224,8 +224,8 @@ def findvideos(item): from hashlib import md5 # Calculate Token - client_ip = support.httptools.downloadpage('https://scws.work/videos/{}'.format(item.scws_id), headers=headers).json.get( - 'client_ip') + # client_ip = support.httptools.downloadpage('https://scws.work/videos/{}'.format(item.scws_id), headers=headers).json.get('client_ip') + client_ip = support.httptools.downloadpage('https://api.ipify.org/', headers=headers).data logger.debug(client_ip) expires = int(time() + 172800) token = b64encode(md5('{}{} Yc8U6r8KjAKAepEA'.format(expires, client_ip).encode('utf-8')).digest()).decode('utf-8').replace('=', '').replace('+', '-').replace('/', '_') diff --git a/channels/streamingcommunity.py b/channels/streamingcommunity.py index b3672112..2054a350 100644 --- a/channels/streamingcommunity.py +++ b/channels/streamingcommunity.py @@ -252,7 +252,8 @@ def play(item): return [] # Calculate Token - client_ip = support.httptools.downloadpage('https://scws.work/videos/{}'.format(scws_id), headers=headers).json.get('client_ip') + # client_ip = support.httptools.downloadpage('https://scws.work/videos/{}?b=1'.format(scws_id), headers=headers).json.get('client_ip') + client_ip = support.httptools.downloadpage('https://api.ipify.org/', headers=headers).data logger.debug(client_ip) expires = int(time() + 172800) token = b64encode(md5('{}{} Yc8U6r8KjAKAepEA'.format(expires, client_ip).encode('utf-8')).digest()).decode('utf-8').replace('=', '').replace('+', '-').replace('/', '_')