From 54b721a6e5baa7b80f922b9a972991cd2ab9082a Mon Sep 17 00:00:00 2001 From: wbt5 Date: Sat, 30 May 2020 20:16:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=99=8E=E7=89=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- huya.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/huya.py b/huya.py index b95705f..968efa6 100644 --- a/huya.py +++ b/huya.py @@ -20,7 +20,7 @@ def get_real_url(room_id): if 'replay' in liveLineUrl: return '直播录像:' + liveLineUrl else: - real_url = ["https:" + liveLineUrl.replace('_2500', ''), "https:" + liveLineUrl] + real_url = ["https:" + re.sub(r'_\d{4}.m3u8', '.m3u8', liveLineUrl), "https:" + liveLineUrl] else: real_url = '未开播或直播间不存在' except: