mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-23 15:18:12 +02:00
feat: Implement comprehensive search configurations for discount stores and add Gifi-specific search and analysis tools.
This commit is contained in:
1 parent
63073d03b5
commit
c159036583
22 files changed
+19849
-14
No files matched your search
@@ -0,0 +1,40 @@
|
||||
"""
|
||||
Test if current Carrefour price extraction works
|
||||
"""
|
||||
import asyncio
|
||||
import sys
|
||||
sys.path.insert(0, '/app')
|
||||
|
||||
from app.services.improved_search_service import ImprovedSearchService
|
||||
|
||||
async def main():
|
||||
print("Initializing browser...")
|
||||
await ImprovedSearchService.initialize()
|
||||
|
||||
print("Searching Carrefour for 'chaise'...\n")
|
||||
results = []
|
||||
count = 0
|
||||
async for result in ImprovedSearchService.search_site_generator("carrefour.fr", "chaise"):
|
||||
results.append(result)
|
||||
count += 1
|
||||
price_status = f"{result.price}€" if result.price else "N/A"
|
||||
print(f"{count}. {result.title[:55]} - {price_status}")
|
||||
if count >= 10:
|
||||
break
|
||||
|
||||
print(f"\n==> Got {len(results)} results")
|
||||
|
||||
# Count prices
|
||||
with_prices = sum(1 for r in results if r.price)
|
||||
print(f"Products with prices: {with_prices}/{len(results)}")
|
||||
|
||||
if with_prices == len(results):
|
||||
print("✅ SUCCESS: All products have prices!")
|
||||
else:
|
||||
print(f"⚠️ WARNING: {len(results) - with_prices} products missing prices")
|
||||
|
||||
print("\nShutting down...")
|
||||
await ImprovedSearchService.shutdown()
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in new issue
Block a user