From 636371b658af45f3bb305842cf68769e1c64980b Mon Sep 17 00:00:00 2001 From: marco <10120390+mac12m99@users.noreply.github.com> Date: Tue, 9 Aug 2022 14:07:49 +0200 Subject: [PATCH] Prova IPv6 #3 --- channels/animeunity.py | 3 ++- channels/streamingcommunity.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/channels/animeunity.py b/channels/animeunity.py index 30fe822e..68e5d7c7 100644 --- a/channels/animeunity.py +++ b/channels/animeunity.py @@ -224,7 +224,8 @@ def findvideos(item): from hashlib import md5 # Calculate Token - client_ip = support.httptools.downloadpage('https://api64.ipify.org/').data + client_ip = support.httptools.downloadpage('https://api64.ipify.org/', use_requests=True).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 3fc0dd8a..06848383 100644 --- a/channels/streamingcommunity.py +++ b/channels/streamingcommunity.py @@ -252,7 +252,8 @@ def play(item): return [] # Calculate Token - client_ip = httptools.downloadpage('https://api64.ipify.org/').data + client_ip = httptools.downloadpage('https://api64.ipify.org/', use_requests=True).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('/', '_')