From 8a6766681b6d56128cb4701a65a0be67ac140dbc Mon Sep 17 00:00:00 2001 From: wbt5 Date: Sat, 13 Nov 2021 22:03:59 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20Improve=20=E6=96=B0=E6=B5=AA=E7=96=AF?= =?UTF-8?q?=E6=92=AD=E7=9B=B4=E6=92=AD=20-=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fengbolive.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fengbolive.py b/fengbolive.py index 9117aed..3e27c25 100644 --- a/fengbolive.py +++ b/fengbolive.py @@ -15,7 +15,8 @@ class FengBo: def get_real_url(self): with requests.Session() as s: - res = s.get('https://external.fengbolive.com/cgi-bin/get_anchor_info_proxy.fcgi?anchorid=' + str(self.rid)).json() + res = s.get(f'https://external.fengbolive.com/cgi-bin/get_anchor_info_proxy.fcgi?anchorid={self.rid}') + res = res.json() if res['ret'] == 1: info = res['info'] info = unquote(info, 'utf-8')