mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-11 17:29:14 +02:00
27 lines
715 B
Python
27 lines
715 B
Python
"""
|
|
Test script to trigger Carrefour search and generate HTML dump
|
|
"""
|
|
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'...")
|
|
results = []
|
|
async for result in ImprovedSearchService.search_site_generator("carrefour.fr", "chaise"):
|
|
results.append(result)
|
|
print(f"Found: {result.title}")
|
|
|
|
print(f"\nTotal results: {len(results)}")
|
|
|
|
print("Shutting down...")
|
|
await ImprovedSearchService.shutdown()
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|