Add NYTimes recipe extraction from __NEXT_DATA__ JSON tag
- Add Roux.NYTimes module with:
- extractNextData: finds <script id="__NEXT_DATA__"> tag in HTML
and parses its JSON content via aeson
- parseNYTRecipe: maps NYTimes recipe JSON structure into a
typed intermediate representation (NYTRecipe, NYTIngredientGroup,
NYTIngredientItem, NYTStepGroup, NYTStepItem)
- Supports all NYTimes Cooking data: title, URL, total time, yield,
topnote, ingredient groups (with section names), step groups
- Add aeson to dependencies
- Add 4 tests: extraction + parsing for both fried-rice and
carrot-risotto example HTML files
- Wire NYTimesSpec into test runner
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user