Browse Source

add 快手 增加等待时间

zhangyong 1 year ago
parent
commit
7886e04e45
1 changed files with 2 additions and 0 deletions
  1. 2 0
      kuaishou/kuaishou_author/kuaishou_author_scheduling_new.py

+ 2 - 0
kuaishou/kuaishou_author/kuaishou_author_scheduling_new.py

@@ -1,6 +1,7 @@
 # -*- coding: utf-8 -*-
 # @Time: 2023/11/07
 import os
+import random
 import sys
 import time
 from datetime import date, timedelta
@@ -80,6 +81,7 @@ class KuaishouauthorScheduling:
         pcursor = ""
         mq = MQ(topic_name="topic_crawler_etl_" + env)
         while True:
+            time.sleep(random.randint(10, 50))
             url = "https://www.kuaishou.com/graphql"
             payload = json.dumps({
                 "operationName": "visionProfilePhotoList",