|
@@ -9,6 +9,9 @@ from datetime import datetime
|
|
import requests
|
|
import requests
|
|
import json
|
|
import json
|
|
import urllib3
|
|
import urllib3
|
|
|
|
+
|
|
|
|
+from main import job_douyin_data
|
|
|
|
+
|
|
sys.path.append(os.getcwd())
|
|
sys.path.append(os.getcwd())
|
|
from common.aliyun_oss_uploading import Oss
|
|
from common.aliyun_oss_uploading import Oss
|
|
from common.common import Common
|
|
from common.common import Common
|
|
@@ -115,18 +118,14 @@ class douyinAuthor():
|
|
Feishu.bot('recommend', '抖音', '抖音cookie失效,请及时更换~')
|
|
Feishu.bot('recommend', '抖音', '抖音cookie失效,请及时更换~')
|
|
# 如果返回空信息,则随机睡眠 600, 1200 秒
|
|
# 如果返回空信息,则随机睡眠 600, 1200 秒
|
|
time.sleep(random.randint(600, 1200))
|
|
time.sleep(random.randint(600, 1200))
|
|
- # 重新获取cookie
|
|
|
|
- cookie = Material.get_douyin_cookie()
|
|
|
|
- douyinAuthor.get_videoList(cls, cookie)
|
|
|
|
|
|
+ job_douyin_data()
|
|
elif len(data) == 0:
|
|
elif len(data) == 0:
|
|
Common.logger().info(
|
|
Common.logger().info(
|
|
f"接口请求失败,请更换cookie")
|
|
f"接口请求失败,请更换cookie")
|
|
Feishu.bot('recommend', '抖音', '抖音cookie失效,请及时更换~')
|
|
Feishu.bot('recommend', '抖音', '抖音cookie失效,请及时更换~')
|
|
# 如果返回空信息,则随机睡眠 600, 1200 秒
|
|
# 如果返回空信息,则随机睡眠 600, 1200 秒
|
|
time.sleep(random.randint(600, 1200))
|
|
time.sleep(random.randint(600, 1200))
|
|
- # 重新获取cookie
|
|
|
|
- cookie = Material.get_douyin_cookie()
|
|
|
|
- douyinAuthor.get_videoList(cls, cookie)
|
|
|
|
|
|
+ job_douyin_data()
|
|
count = 0
|
|
count = 0
|
|
for i in range(len(data)):
|
|
for i in range(len(data)):
|
|
try:
|
|
try:
|