From 7a0320b762c1a6894fc9036810c61d0c93c1e441 Mon Sep 17 00:00:00 2001 From: wbt5 Date: Sat, 20 Nov 2021 21:51:04 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20Fix=20=E7=83=AD=E7=8C=AB=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=20-=E4=BF=AE=E5=A4=8D=E6=92=AD=E6=94=BE=E5=9C=B0?= =?UTF-8?q?=E5=9D=80host=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 --- yuanbobo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yuanbobo.py b/yuanbobo.py index fe92261..b57c323 100644 --- a/yuanbobo.py +++ b/yuanbobo.py @@ -10,12 +10,12 @@ class YuanBoBo: def get_real_url(self): with requests.Session() as s: - res = s.get('https://zhibo.yuanbobo.com/' + str(self.rid)).text + res = s.get(f'https://zhibo.yuanbobo.com/{self.rid}').text stream_id = re.search(r"stream_id:\s+'(\d+)'", res) if stream_id: status = re.search(r"status:\s+'(\d)'", res).group(1) if status == '1': - real_url = 'http://ks-hlslive.yuanbobo.com/live/{}/index.m3u8'.format(stream_id.group(1)) + real_url = f'https://tliveplay.yuanbobo.com/live/{stream_id.group(1)}.m3u8' return real_url else: raise Exception('未开播')