1
0
mirror of https://github.com/wbt5/real-url.git synced 2025-06-17 08:25:25 +08:00

Merge pull request #48 from BlancRay/master

修复虎牙直播录像地址
This commit is contained in:
乌帮图 2020-07-18 15:40:24 +08:00 committed by GitHub
commit f24c64ca4b
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]
if liveLineUrl:
if 'replay' in liveLineUrl:
return '直播录像:' + liveLineUrl
return '直播录像:https:' + liveLineUrl
else:
liveLineUrl = live(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')
real_url = get_real_url(rid)
print('该直播间源地址为:')
print(real_url)
print(real_url)