diff --git a/TikTok.py b/TikTok.py index 62fa7f2..026716b 100644 --- a/TikTok.py +++ b/TikTok.py @@ -93,6 +93,14 @@ class TikTok(object): # 获取原声 id key = re.findall('music/(\d+)?', urlstr)[0] key_type = "music" + elif "/webcast/reflow/" in urlstr: + key1 = re.findall('reflow/(\d+)?', urlstr)[0] + url = self.urls.LIVE2 + self.utils.getXbogus( + f'live_id=1&room_id={key1}&app_id=1128') + res = requests.get(url, headers=self.headers) + resjson = json.loads(res.text) + key = resjson['data']['room']['owner']['web_rid'] + key_type = "live" elif "live.douyin.com" in r.url: key = r.url.replace('https://live.douyin.com/', '') key_type = "live" diff --git a/TikTokUrls.py b/TikTokUrls.py index 306b4f5..ccedc78 100644 --- a/TikTokUrls.py +++ b/TikTokUrls.py @@ -70,6 +70,7 @@ class Urls(object): # 直播 self.LIVE = 'https://live.douyin.com/webcast/room/web/enter/?' + self.LIVE2 = 'https://webcast.amemv.com/webcast/room/reflow/info/?' # 音乐 self.MUSIC = 'https://www.douyin.com/aweme/v1/web/music/aweme/?'