From 5a175ec2833a82d0e63ed991d44620a964e587a0 Mon Sep 17 00:00:00 2001 From: wbt5 Date: Sat, 20 Nov 2021 23:12:35 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20Improve=20=E8=BF=85=E9=9B=B7=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=20-=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xunlei.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xunlei.py b/xunlei.py index c1ee0ed..e85c878 100644 --- a/xunlei.py +++ b/xunlei.py @@ -27,7 +27,7 @@ class XunLei: 'uuid': self.rid, } data = urlencode(params) - p = hashlib.md5((u + data + f).encode('utf-8')).hexdigest() + p = hashlib.md5(f'{u}{data}{f}'.encode('utf-8')).hexdigest() params['sign'] = p with requests.Session() as s: res = s.get(url, params=params, headers=headers).json() @@ -54,4 +54,3 @@ def get_real_url(rid): if __name__ == '__main__': r = input('请输入迅雷直播房间号:\n') print(get_real_url(r)) -