big changes, sorry
This commit is contained in:
@@ -357,7 +357,8 @@ def extract_product_info(
|
||||
"shop": shop_delivery,
|
||||
"home": home_delivery,
|
||||
},
|
||||
"in_stock": shop_delivery in ("FOR_TOMORROW", "IMMEDIATE") or home_delivery in ("FOR_TOMORROW", "IMMEDIATE"),
|
||||
# "in_stock": shop_delivery in ("FOR_TOMORROW", "IMMEDIATE") or home_delivery in ("FOR_TOMORROW", "IMMEDIATE"),
|
||||
"in_stock": all(code not in ("UNAVAILABLE", "TEMPORARILY_UNAVAILABLE", None) for code in [shop_delivery, home_delivery])
|
||||
}
|
||||
|
||||
|
||||
@@ -459,7 +460,8 @@ def fetch_products(
|
||||
driver, # Передаем driver в clean_description
|
||||
filtered_product["plu"],
|
||||
)
|
||||
all_products.append(filtered_product)
|
||||
if filtered_product["prices"]["mainPrice"] >= 300:
|
||||
all_products.append(filtered_product)
|
||||
|
||||
current_product += 1
|
||||
if status is not None:
|
||||
|
||||
Reference in New Issue
Block a user