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