feat: Add API endpoints for managing and querying catalogues, enseignes, and scraping statistics.

This commit is contained in:
Michael committed 2025-11-30 02:33:15 +01:00
1 parent ec97822087
commit 11d297764d
1 file changed
+8 -3
+8 -3
View File
@@ -270,10 +270,15 @@ async def trigger_scraping(
"error": log.message_erreur
}
else:
# Not implemented yet for all enseignes in this version
# Scrape all enseignes
from app.services.cataloguemate_scraper import scrape_all_enseignes
logs = await scrape_all_enseignes(db)
total_new = sum(log.catalogues_nouveaux for log in logs)
return {
"message": "Scraping all enseignes not yet implemented with new scraper",
"catalogues_nouveaux": 0,
"message": f"Scraping completed for all enseignes. {len(logs)} processed.",
"catalogues_nouveaux": total_new,
}