mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-14 10:46:32 +02:00
feat: Add AI-powered data extraction and direct search services
This commit is contained in:
1 parent
a78d24fe5a
commit
b6c1fc1cda
2 files changed
+6
-6
No files matched your search
@@ -352,9 +352,11 @@ class AIService:
|
||||
logger.info("JSON repair successful")
|
||||
except Exception as repair_error:
|
||||
logger.error(f"JSON repair also failed: {repair_error}")
|
||||
raise
|
||||
# Return None instead of raising to prevent crash
|
||||
return None
|
||||
else:
|
||||
raise
|
||||
logger.warning("JSON repair disabled, returning None")
|
||||
return None
|
||||
|
||||
# Create metadata
|
||||
metadata = AIExtractionMetadata(
|
||||
|
||||
@@ -459,10 +459,8 @@ DEFAULT_SITE_CONFIGS = {
|
||||
"gifi.fr": {
|
||||
"name": "Gifi",
|
||||
"search_url": "https://www.gifi.fr/resultat-recherche?q={query}",
|
||||
"product_selector": (
|
||||
"h3[data-gtm] a.link, .product-tile a[aria-label='Afficher les détails du produit']"
|
||||
),
|
||||
"wait_selector": ".products-grid, .product-items, .search-results, .products",
|
||||
"product_selector": "a.link, .product-item a.link, .product-tile a.link",
|
||||
"wait_selector": ".product-item, .product-tile, .products-grid",
|
||||
"category": "Discount",
|
||||
"requires_js": True,
|
||||
"priority": 1,
|
||||
|
||||
Reference in new issue
Block a user