From 6b290826dce7c825959caee648ac9c1ef57d0dfd Mon Sep 17 00:00:00 2001 From: wbt5 Date: Sat, 23 May 2020 02:55:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B017=E7=9B=B4=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 17live.py | 9 +++++++-- README.md | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/17live.py b/17live.py index 520f838..3674b72 100644 --- a/17live.py +++ b/17live.py @@ -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 diff --git a/README.md b/README.md index a7c5818..5d0557a 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,9 @@ ## 更新 -### 2020.05.19:更新火猫、快手、酷狗、PPS +### 2020.05.23:更新 17直播 + +2020.05.19:更新火猫、快手、酷狗、PPS 2020.05.08:新增优酷轮播台、look 直播、千帆直播;