From d8d6bd370163860e2e1759aef62f953d176714a0 Mon Sep 17 00:00:00 2001 From: wbt5 Date: Fri, 3 Jan 2020 00:16:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BF=AB=E6=89=8B=E7=9B=B4?= =?UTF-8?q?=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kuaishou.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kuaishou.py b/kuaishou.py index 288f809..6a4ca68 100644 --- a/kuaishou.py +++ b/kuaishou.py @@ -1,8 +1,7 @@ -# 获取快手直播的真实流媒体地址。 -# 输出是最高画质 - +# 获取快手直播的真实流媒体地址,默认输出最高画质 import requests +import json 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] real_url = [m3u8_url + i for i in ['.flv', '.m3u8']] except: - real_url = '直播间不存在或未开播' + real_url = '该直播间不存在或未开播' return real_url