mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-22 14:48:13 +02:00
feat: Add API endpoints for managing and querying catalogues, enseignes, and scraping statistics.
This commit is contained in:
1 parent
ec97822087
commit
11d297764d
1 file changed
+8
-3
@@ -270,10 +270,15 @@ async def trigger_scraping(
|
|||||||
"error": log.message_erreur
|
"error": log.message_erreur
|
||||||
}
|
}
|
||||||
else:
|
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 {
|
return {
|
||||||
"message": "Scraping all enseignes not yet implemented with new scraper",
|
"message": f"Scraping completed for all enseignes. {len(logs)} processed.",
|
||||||
"catalogues_nouveaux": 0,
|
"catalogues_nouveaux": total_new,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user