From f750d711f24b04cb212584f5a6d3bf3fd2c9be3c Mon Sep 17 00:00:00 2001 From: wbt5 Date: Sat, 18 Jan 2020 15:48:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8A=96=E9=9F=B3=E7=9B=B4?= =?UTF-8?q?=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ douyin.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ce6bfd..aea3f52 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ 目前有21个直播平台:斗鱼直播、虎牙直播、哔哩哔哩直播、战旗直播、网易CC直播、火猫直播、企鹅电竞、YY直播、一直播、快手直播、花椒直播、映客直播、西瓜直播、触手直播、NOW直播、抖音直播,爱奇艺直播、酷狗直播、龙珠直播、PPS奇秀直播、六间房。 +> 2020.01.18:更新抖音直播。 + > 2020.01.10:新增酷狗直播、龙珠直播、PPS奇秀直播、六间房。 > 2020.01.09:新增爱奇艺直播。 diff --git a/douyin.py b/douyin.py index 92e0634..175d8e6 100644 --- a/douyin.py +++ b/douyin.py @@ -10,7 +10,7 @@ import re def get_real_url(rid): try: if 'v.douyin.com' in rid: - room_id = re.findall(r'live/(\d+)\?utm', requests.get(url=rid).url)[0] + room_id = re.findall(r'(\d{19})', requests.get(url=rid).url)[0] else: room_id = rid room_url = 'https://webcast-hl.amemv.com/webcast/room/reflow/info/?room_id={}&live_id=1'.format(room_id)