From b134f50f1e4a11435e7dd693b60109c33562c2f4 Mon Sep 17 00:00:00 2001 From: "shariar@raenabeauty.com" Date: Mon, 18 Mar 2024 12:21:39 +0400 Subject: [PATCH] added Hasaki crawler --- hasaki_crawler_engine/hasaki_product_info.py | 3 +-- hasaki_crawler_engine/test2.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hasaki_crawler_engine/hasaki_product_info.py b/hasaki_crawler_engine/hasaki_product_info.py index 9db5faf..c7bf9a6 100644 --- a/hasaki_crawler_engine/hasaki_product_info.py +++ b/hasaki_crawler_engine/hasaki_product_info.py @@ -164,10 +164,9 @@ class HasakiProductInfo: else: iteminfo = request.response.body - iteminfo_json = json.loads(iteminfo) - driver.quit() + iteminfo_json = json.loads(iteminfo) return iteminfo_json def product_info(self, data, raw_data): diff --git a/hasaki_crawler_engine/test2.py b/hasaki_crawler_engine/test2.py index 3c1621b..f2bcd24 100644 --- a/hasaki_crawler_engine/test2.py +++ b/hasaki_crawler_engine/test2.py @@ -40,4 +40,4 @@ def get_raw_product(url): return iteminfo_json -get_raw_product('https://hasaki.vn/san-pham/nuoc-tay-trang-bioderma-danh-cho-da-nhay-cam-500ml-9740.html') \ No newline at end of file +print(get_raw_product('https://hasaki.vn/san-pham/nuoc-tay-trang-bioderma-danh-cho-da-nhay-cam-500ml-9740.html')) \ No newline at end of file