فهرست منبع

add douyin 主页

zhangyong 1 سال پیش
والد
کامیت
39bc3a0ec3
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      douyin/douyin_author/douyin_author_scheduling_new.py

+ 2 - 2
douyin/douyin_author/douyin_author_scheduling_new.py

@@ -57,7 +57,7 @@ class DouyinauthorScheduling:
         while True:
             cookie = cls.get_cookie(log_type, crawler, env)["cookie"]
 
-            time.sleep(random.randint(10, 50))
+            time.sleep(random.randint(5, 10))
             url = 'https://www.douyin.com/aweme/v1/web/aweme/post/'
             account_id = user_dict["link"]
             headers = {
@@ -161,7 +161,7 @@ class DouyinauthorScheduling:
                             continue
                         video_percent = '%.2f' % (share_count / digg_count)
                         if digg_count < 50000 and digg_count < 50:
-                            if video_percent < 0.02:
+                            if video_percent < "0.02":
                                 Common.logger(log_type, crawler).info(f"不符合条件:分享/点赞-{video_percent},点赞量-{digg_count}\n")
                                 AliyunLogger.logging(
                                     code="2004",