shivanis14
commited on
Commit
•
7389d7d
1
Parent(s):
b81be91
Update data_extractor.py
Browse files- data_extractor.py +2 -2
data_extractor.py
CHANGED
@@ -168,8 +168,8 @@ def find_product(product_name):
|
|
168 |
query = {"productName": {"$regex": re.compile(i, re.IGNORECASE)}}
|
169 |
products = collection.find(query)
|
170 |
for product in products:
|
171 |
-
if product['productName'] not in product_list:
|
172 |
-
product_list.append(product['productName'])
|
173 |
|
174 |
# # Create a list of product names that match the query
|
175 |
# product_list = [product['productName'] for product in products]
|
|
|
168 |
query = {"productName": {"$regex": re.compile(i, re.IGNORECASE)}}
|
169 |
products = collection.find(query)
|
170 |
for product in products:
|
171 |
+
if product['brandName'] + " " + product['productName'] not in product_list:
|
172 |
+
product_list.append(product['brandName'] + " " + product['productName'])
|
173 |
|
174 |
# # Create a list of product names that match the query
|
175 |
# product_list = [product['productName'] for product in products]
|