From 30732aa065efda129510cca35284004cb5d27e2b Mon Sep 17 00:00:00 2001 From: "shariar@raenabeauty.com" Date: Fri, 15 Mar 2024 12:11:14 +0400 Subject: [PATCH] added Hasaki crawler --- hasaki_crawler_engine/hasaki_product_info.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hasaki_crawler_engine/hasaki_product_info.py b/hasaki_crawler_engine/hasaki_product_info.py index 29bd5a1..297833c 100644 --- a/hasaki_crawler_engine/hasaki_product_info.py +++ b/hasaki_crawler_engine/hasaki_product_info.py @@ -59,7 +59,6 @@ class HasakiProductInfo: try: self.get_product_info(row) - time.sleep(random.randint(7,27)) except: pass @@ -72,6 +71,8 @@ class HasakiProductInfo: cnt += 1 + time.sleep(random.randint(7, 23)) + def get_product_info(self, data): @@ -103,6 +104,8 @@ class HasakiProductInfo: try: page.goto(url, timeout=5000) + time.sleep(1) + page.reload() with page.expect_response("**/wap/v2/product/detail**") as response: api_requests = response.value.json() except playwright._impl._errors.TimeoutError: