mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-11 17:29:14 +02:00
1.8 KiB
1.8 KiB
Task: Fix Screenshot Update Issue
Context
The user reports that in the "Suivi prix" (Tracking) section, triggering an update ("Mise à jour") does not update the screenshot. This has been identified as a caching issue due to static filenames.
Current Focus
Implementing logic to generate unique timestamped filenames for screenshots to bypass browser caching and ensure the latest image is displayed.
Master Plan
- Modify
tracking_scraper_service.pyto use timestamped filenames for tracking screenshots - Verify that
item_service.pycorrectly picks up the new files - Create verification script
verify_screenshot_update.py - Run verification and confirm fix
- Modify
ItemService.get_itemsto scan filesystem for latest screenshot - Update
ItemService.delete_itemto clean up all related screenshots - Create
verify_fix_item_service.pyto test the new logic
Current Focus
Improving price extraction reliability for B&M Stores and others.
- Analyze
ai_schema.pyto check the extraction prompt - Improve
ScraperService._extract_textto be more targeted (e.g. main content only) - Update AI prompt to better handle multiple prices (unit vs package)
- Verify extraction logic with simulation script
Progress Log
- Identified the issue:
ScraperServiceoverwritesitem_{id}.png. - Created implementation plan.
- User approved plan.
- Implemented filesystem scanning in
ItemService. - Verified fix with
verify_fix_item_service.pysuccessfully. - Improved AI prompt to ignore unit prices (like "Prix au litre").
- Enhanced text extraction to remove menu/footer noise.
- Verified logic with
verify_extraction_logic.py(simulated).