feat(scrapers): replace ISS scraper with Nordrest scraper for Gourmed…#4
Open
simon-ingelsson-sr wants to merge 6 commits into
Open
feat(scrapers): replace ISS scraper with Nordrest scraper for Gourmed…#4simon-ingelsson-sr wants to merge 6 commits into
simon-ingelsson-sr wants to merge 6 commits into
Conversation
…ia and Karavan - Add NordrestMenuScraper parsing the Castit lunch widget from nordrest.se - Support weekly specials (veckans rätt) merged into each day's menu - Switch Gourmedia and Karavan to use NordrestMenuScraper - Remove unused iss_scraper.py - Add 'salladsbar' as a vegetarian keyword in DishClassifier - Display menu items as bullet points in CLI output Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…cture
Both Gourmedia and Karavan now render menus via the Castit widget
using 'section.castit-day' elements instead of the old accordion
structure ('div.accordion-item.weekday-item').
- Rewrite _parse_weekly_menu to find section.castit-day elements
and extract dish titles/descriptions from castit-dish divs
- Add missing 'import re' that caused NameError in _parse_dishes
- Fix .mcp.json to point to simon-ingelsson-sr/rhlunch instead of
hamiltoon/rhlunch (which still used the old ISS API scraper)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract dishes from the castit-week-specials-column section and append them to every day's menu, so recurring weekly dishes like 'Karavans salladsbar' are included alongside the daily offerings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
26 tests covering: - _fetch_page (success + HTTP failure) - _extract_dishes_from_section (title+desc, no desc, too-short skip) - _parse_dishes (menu key, dietary codes, price suffix, empty, short) - _parse_weekly_menu (all weekdays, weekly specials appended, no castit, unrecognised day names) - get_menu_for_day (Monday, Tuesday, day not found, fetch failure) - get_weekly_menu (all days, fetch failure) - Integration tests against live-fetched HTML fixtures for both Karavan and Gourmedia (2025-11-10) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ia and Karavan
Description
Type of Change
Checklist
Testing
Screenshots (if applicable)
Additional Context