1
0
mirror of https://github.com/wbt5/real-url.git synced 2025-08-02 15:44:49 +08:00

修复虎牙直播录像地址

虎牙直播录像地址缺少https
This commit is contained in:
Blanc Ray 2020-07-17 10:38:20 +08:00 committed by GitHub
parent afcd4d3be8
commit 9a3fdbbddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ def get_real_url(room_id):
liveLineUrl = re.findall(r'liveLineUrl = "([\s\S]*?)";', response)[0] liveLineUrl = re.findall(r'liveLineUrl = "([\s\S]*?)";', response)[0]
if liveLineUrl: if liveLineUrl:
if 'replay' in liveLineUrl: if 'replay' in liveLineUrl:
return '直播录像:' + liveLineUrl return '直播录像:https:' + liveLineUrl
else: else:
liveLineUrl = live(liveLineUrl) liveLineUrl = live(liveLineUrl)
real_url = ["https:" + liveLineUrl, "https:" + re.sub(r'_\d{4}.m3u8', '.m3u8', liveLineUrl)] real_url = ["https:" + liveLineUrl, "https:" + re.sub(r'_\d{4}.m3u8', '.m3u8', liveLineUrl)]
@ -56,4 +56,4 @@ def get_real_url(room_id):
rid = input('请输入虎牙房间号:\n') rid = input('请输入虎牙房间号:\n')
real_url = get_real_url(rid) real_url = get_real_url(rid)
print('该直播间源地址为:') print('该直播间源地址为:')
print(real_url) print(real_url)