Skip to content

Commit 1c0fa86

Browse files
m4dm4rtig4nClément VALENTINclaude
authored
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

2 files changed

+297
-103
lines changed

apps/api/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ dev = [
7171
"ruff>=0.13.3",
7272
"pytest>=8.4.2",
7373
"pytest-asyncio>=1.2.0",
74+
"ruff>=0.13.3",
7475
]

0 commit comments

Comments
 (0)