mirror of
https://github.com/wbt5/real-url.git
synced 2025-07-30 05:20:31 +08:00
更新17直播
This commit is contained in:
parent
9bc448f5ef
commit
6b290826dc
@ -6,8 +6,13 @@ import requests
|
||||
|
||||
def get_real_url(rid):
|
||||
try:
|
||||
response = requests.post(url='https://api-dsa.17app.co/api/v1/lives/' + rid +'/viewers/alive', data='{"liveStreamID":rid}').json()
|
||||
real_url = response.get('rtmpUrls')[0].get('url')
|
||||
response = requests.get(url='https://api-dsa.17app.co/api/v1/lives/' + rid).json()
|
||||
real_url_default = response.get('rtmpUrls')[0].get('url')
|
||||
userID = response.get('userID', 0)
|
||||
real_url_wansu = ''
|
||||
if userID:
|
||||
real_url_wansu = 'http://wansu-china-pull-rtmp-17.tigafocus.com/vod/' + userID + '.flv'
|
||||
real_url = [real_url_default, real_url_wansu]
|
||||
except:
|
||||
real_url = '该直播间不存在或未开播'
|
||||
return real_url
|
||||
|
Loading…
x
Reference in New Issue
Block a user