Commit 1c0fa86
fix(scraper): fix Enercoop PDF parser to extract real prices (#63)
* fix(scraper): fix Enercoop PDF parser to correctly extract prices
The Enercoop PDF parser was using fallback values because the parsing logic
didn't match the actual PDF structure. This fix:
- Corrects subscription price extraction: PDF lists 36 HTT prices (index 0-35)
then 36 TTC prices (index 36-71), not interleaved pairs
- Corrects kWh price extraction: PDF has 4 values (HTT old, TTC old, HTT current,
TTC current) - we want index 3, not index 1
- Adds proper section markers for "Flexi Watt - nuit & week-end" and "2 saisons"
- Updates SEASONAL fallback prices to match current PDF (winter HP/HC values)
- Renames WEEKEND offer type to HC_NUIT_WEEKEND for consistency
- Now correctly extracts 33 offers from PDF instead of using fallback
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* chore(deps): add ruff dev dependency
---------
Co-authored-by: Clément VALENTIN <[email protected]>
Co-authored-by: Claude <[email protected]>1 parent 21d3993 commit 1c0fa86
File tree
2 files changed
+297
-103
lines changed- apps/api
- src/services/price_scrapers
2 files changed
+297
-103
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
0 commit comments