added Hasaki crawler

This commit is contained in:
Shariar Imtiaz 2024-03-15 12:11:14 +04:00
parent c10998abbc
commit 30732aa065
1 changed files with 4 additions and 1 deletions

View File

@ -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: