Browse Source

更改抓取速度

zhangyong 8 months ago
parent
commit
334def32eb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      data_channel/qpl_cljx.py

+ 2 - 2
data_channel/qpl_cljx.py

@@ -109,9 +109,9 @@ class QplKs:
                             sqlCollect.insert_ks_star_data(user_id, star_id, name, kwai_id, gender, fans_number, profile_id, star_tag_str, industry_tag_str, photo_expect_play, photo_expect_cpm, photo_interaction_rate, photo_complete_play_rate, fans_increase_num, fans_increase_rate)
                             sqlCollect.insert_ks_star_data(user_id, star_id, name, kwai_id, gender, fans_number, profile_id, star_tag_str, industry_tag_str, photo_expect_play, photo_expect_cpm, photo_interaction_rate, photo_complete_play_rate, fans_increase_num, fans_increase_rate)
                             print(f"{star_id}-{profile_id}获取列表入库成功")
                             print(f"{star_id}-{profile_id}获取列表入库成功")
                             cls.ks_star_works_info(star_id, profile_id)
                             cls.ks_star_works_info(star_id, profile_id)
-                            time.sleep(5)
+                            time.sleep(random.randint(10, 20))
                             cls.ks_list_portrait_info(star_id, profile_id)
                             cls.ks_list_portrait_info(star_id, profile_id)
-                            time.sleep(5)
+                            time.sleep(random.randint(10, 20))
                             # # if res == 1:
                             # # if res == 1:
                             # current_time = datetime.now()
                             # current_time = datetime.now()
                             # formatted_time = current_time.strftime("%Y-%m-%d %H:%M:%S")
                             # formatted_time = current_time.strftime("%Y-%m-%d %H:%M:%S")