diff --git a/hasaki_crawler_engine/hasaki_product_info.py b/hasaki_crawler_engine/hasaki_product_info.py index 0fd9605..d2d9693 100644 --- a/hasaki_crawler_engine/hasaki_product_info.py +++ b/hasaki_crawler_engine/hasaki_product_info.py @@ -400,7 +400,7 @@ class HasakiProductInfo: except: pass - reviews = reviews1 + reviews2 + reviews = self.join_lists(reviews1, reviews2) @@ -446,7 +446,17 @@ class HasakiProductInfo: except Exception as e: logging.info(e) - + def join_lists(self, list1, list2): + # Check if both lists are None + if list1 is None and list2 is None: + return None + # Check if one of the lists is None + elif list1 is None: + return list2 + elif list2 is None: + return list1 + else: + return list1 + list2 def seo_info(self, raw_data):