From c59e8f72dfb79b1987014bfa387d3d9d36987af9 Mon Sep 17 00:00:00 2001 From: imgyh <1974355683@qq.com> Date: Thu, 2 Mar 2023 17:13:55 +0800 Subject: [PATCH] =?UTF-8?q?test(tiktok):=20=E5=A2=9E=E5=8A=A0=E9=9F=B3?= =?UTF-8?q?=E4=B9=90=E5=90=88=E9=9B=86=E5=8A=9F=E8=83=BD=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TikTokTest.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/TikTokTest.py b/TikTokTest.py index 9ab3786..314233b 100644 --- a/TikTokTest.py +++ b/TikTokTest.py @@ -62,6 +62,15 @@ def getUserAllMixInfo(): mixIdNameDict = tk.getUserAllMixInfo(key, count=35) print(mixIdNameDict) +def getMusicInfo(): + music_link = 'https://v.douyin.com/S6YMNXs/' + tk = TikTok() + + url = tk.getShareLink(music_link) + key_type, key = tk.getKey(url) + awemeList = tk.getMusicInfo(key,count=35) + print(len(awemeList)) + def test(): utils=TikTokUtils.Utils() user_all_mix_link = 'https://www.douyin.com/aweme/v1/web/aweme/post/?'+\ @@ -84,6 +93,7 @@ def test(): if __name__ == "__main__": # test() + # getMusicInfo() # getUserAllMixInfo() # getMixInfo() # getAwemeInfo() @@ -115,4 +125,7 @@ if __name__ == "__main__": # 用户主页下所有合集 # python TikTokCommand.py -l https://v.douyin.com/B38oovu/ -p /mnt/c/project/test7 -M mix # .\TikTokCommand.exe -l https://v.douyin.com/B38oovu/ -p .\test7 -M mix +# 音乐集合 +# python TikTokCommand.py -l https://v.douyin.com/S6YMNXs/ -p /mnt/c/project/test8 +# .\TikTokCommand.exe -l https://v.douyin.com/S6YMNXs/ -p .\test8 #################################################################################################