There was an error while loading. Please reload this page.
1 parent d76f9b7 commit 2053929Copy full SHA for 2053929
douyin_pro_2.py
@@ -43,11 +43,13 @@ def get_video_urls(self, user_id):
43
html = json.loads(req.text)
44
for each in html['aweme_list']:
45
share_desc = each['share_info']['share_desc']
46
+for c in r'\/:*?"<>|':
47
+share_desc = share_desc.replace(c, '')
48
unix_timestamp = each['create_time']
49
utc_time = datetime.fromtimestamp(unix_timestamp, timezone.utc)
50
local_time = utc_time.astimezone()
51
tc = local_time.strftime('%Y-%m-%d-%H-%M-%S')
-if '抖音-原创音乐短视频社区' == share_desc:
52
+if share_desc in ['抖音-原创音乐短视频社区', 'TikTok']:
53
video_names.append(tc + '.mp4')
54
else:
55
video_names.append(tc + '-' + share_desc + '.mp4')
0 commit comments