added Hasaki crawler
This commit is contained in:
parent
c10998abbc
commit
30732aa065
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue