mirror of
https://github.com/wbt5/real-url.git
synced 2025-07-27 19:10:32 +08:00
更新快手直播
This commit is contained in:
parent
fdfce61e9d
commit
d8d6bd3701
@ -1,8 +1,7 @@
|
|||||||
# 获取快手直播的真实流媒体地址。
|
# 获取快手直播的真实流媒体地址,默认输出最高画质
|
||||||
# 输出是最高画质
|
|
||||||
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
import json
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ def get_real_url(rid):
|
|||||||
m3u8_url = re.findall(r'type="video/mp4" src="([\s\S]*?)_sd1000tp.m3u8', response)[0]
|
m3u8_url = re.findall(r'type="video/mp4" src="([\s\S]*?)_sd1000tp.m3u8', response)[0]
|
||||||
real_url = [m3u8_url + i for i in ['.flv', '.m3u8']]
|
real_url = [m3u8_url + i for i in ['.flv', '.m3u8']]
|
||||||
except:
|
except:
|
||||||
real_url = '直播间不存在或未开播'
|
real_url = '该直播间不存在或未开播'
|
||||||
return real_url
|
return real_url
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user