mirror of
https://github.com/wbt5/real-url.git
synced 2025-06-17 08:25:25 +08:00
commit
f24c64ca4b
4
huya.py
4
huya.py
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user