Ver Fonte

add 快手 增加等待时间

zhangyong há 1 ano atrás
pai
commit
7886e04e45

+ 2 - 0
kuaishou/kuaishou_author/kuaishou_author_scheduling_new.py

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