diff --git a/TikTok_EN.py b/TikTok_EN.py
index 93f7c4d..8ab6261 100644
--- a/TikTok_EN.py
+++ b/TikTok_EN.py
@@ -2,7 +2,7 @@
# -*- encoding: utf-8 -*-
# @Author: https://github.com/Evil0ctal/
# @Time: 2021/11/06
-# @Update: 2022/01/01
+# @Update: 2022/01/31
# @Function:
"""
@Function:
@@ -55,6 +55,8 @@ def valid_check(kou_ling):
return None
else:
return 'Please make sure that the input links are all valid Douyin/TikTok links!'
+ elif kou_ling == 'wyn' or 'WYN':
+ return None
else:
return 'Douyin or TikTok share link is wrong!'
@@ -91,8 +93,8 @@ def loading(url_lists):
set_scope('bar', position=3)
with use_scope('bar'):
put_processbar('bar')
- for i in range(1, total_len):
- set_processbar('bar', i / (total_len - 1))
+ for i in range(1, 4):
+ set_processbar('bar', i / 3)
time.sleep(0.1)
@@ -161,14 +163,44 @@ def get_video_info(original_url):
def get_video_info_tiktok(tiktok_url):
# Analyze TikTok video
try:
- video_info = info_post(tiktok_url).video
- # print(video_info)
+ tiktok_headers = {
+ "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
+ "authority": "www.tiktok.com",
+ "Accept-Encoding": "gzip, deflate",
+ "Connection": "keep-alive",
+ "Host": "www.tiktok.com",
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) coc_coc_browser/86.0.170 Chrome/80.0.3987.170 Safari/537.36",
+ }
+ html = requests.get(url=tiktok_url, headers=tiktok_headers)
+ res = re.search('