From a79a83ba7fea95ca7f388806cb2ced45e63e6282 Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Tue, 23 Mar 2021 20:48:21 +0100 Subject: [PATCH] fix bug py3 streamingcommunity --- channels/streamingcommunity.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/channels/streamingcommunity.py b/channels/streamingcommunity.py index cbfa6fa5..e784d324 100644 --- a/channels/streamingcommunity.py +++ b/channels/streamingcommunity.py @@ -208,9 +208,8 @@ def findvideos(item): i = 'Yc8U6r8KjAKAepEA' t = int(time() + (3600 * o)) l = '{}{} {}'.format(t, n, i) - md5 = hashlib.md5() - md5.update(l) - s = '?token={}&expires={}'.format(b64(md5.digest()).replace('=', '').replace('+', "-").replace('\\', "_"), t) + md5 = hashlib.md5(l.encode()) + s = '?token={}&expires={}'.format(b64(md5.digest()).decode().replace('=', '').replace('+', "-").replace('\\', "_"), t) return s token = calculateToken()