Repository navigation
fix(scraper): parse Norrport's current calendar markup - #441
Merged
Merged
Conversation
The scraper found 0 events on norrport.se. Two things on the page changed:
- The booking button now carries the date as `data-date`; the
`openBookingForEvent('…')` onclick the parser read is gone, so every
card was dropped.
- Cards list a start time only ("kl 19:00"); the parser required a
"19:00 - 22:00" range. A missing end is filled as start + 3h, the slot
every existing Norrport row uses, because `end` is required downstream.
Titles like "Old Boy Stompers! 🎉" also had the emoji and "!" written into
the band name; they are stripped now.
The fixture is refreshed to the live page, and the tests cover the
failure that shipped (0 events) plus explicit ends and midnight wrap.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tu5y7PyLZGtzXKELGRAEKq
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch was successfully deployed
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.
The Norrport scraper was finding 0 events on norrport.se. That is why the 29 Oct Old Boy Stompers show (#440) had to be added by hand.
What changed on the site
onclick="openBookingForEvent('2026-06-18', …)". It now carries it asdata-date="2026-10-29". The parser read theonclick, so every card was dropped.kl 19:00 - 22:00. Most now readkl 19:00, and the parser required a range.What this PR does
data-date.endis filled as start + 3h, wrapping past midnight.endcan't be left empty:ics.tsandjsonld.tsboth compute from it, and no row inoneoffs.csvhas an empty one. All 25 existing Norrport rows are exactly 3h (19:00–22:00 or 20:00–23:00). An explicit end on the card still wins.!or:from band names.Old Boy Stompers! 🎉was being written to the CSV with the emoji.fixtures/norrport.htmlto the live page and rewrites the Norrport tests around it. The new tests fail on the old parser (11 of 17) and pass now. They include a guard that the parser reads every bookable card, so a markup change that makes it return 0 events fails the build.docs/architecture/SCRAPERS.md.Private "Abonnerat" events (disabled button, no date) and
STÄNGTdays are still skipped.ABONNERATis also alreadyswing=noinbands.csv.Checked
npm testpasses (345 tests),eslint scripts/scrapersis clean,npm run validate:datapasses.node scripts/scrape.mjs --dry-runagainst the live site: Norrport yields 9 trusted events, of which 8 are new proposals and the 29 Oct show is skipped as already on the calendar (the hand-added row has the samenorrport-2026-10-29id). 9 unknown acts are surfaced for the bands PR. The other S:ta Clara, Chicago and Årstaliden fetches failed in my sandbox because of its network policy, so I did not verify those parsers.Worth knowing
Generated by Claude Code