VG and Aftenposten scrapers return no articles after site redesign #11

Closed
opened 2026-06-15 21:45:33 +02:00 by arne · 0 comments
Owner

Both vg.no and aftenposten.no migrated to the same Schibsted frontend with build-hashed CSS-module class names. The homepage scrapers' selectors no longer match anything:

  • VG looks for article.article-extract and h2.headline — both gone.
  • Aftenposten looks for article.teaser[data-pulse-url] and data-pulse-teaser-title — the attributes were removed.

Both scrapers hit their no articles found guard. Article-page content extraction (.article-body p / article p + og: meta tags) is unaffected.

Fix: replace both homepage parsers with a shared Schibsted parser keyed on stable hooks (a[data-content-type="article"] for links, h2[aria-label] for titles), host-filtered per site. Refresh test fixtures.

Both vg.no and aftenposten.no migrated to the same Schibsted frontend with build-hashed CSS-module class names. The homepage scrapers' selectors no longer match anything: - VG looks for `article.article-extract` and `h2.headline` — both gone. - Aftenposten looks for `article.teaser[data-pulse-url]` and `data-pulse-teaser-title` — the attributes were removed. Both scrapers hit their `no articles found` guard. Article-page content extraction (`.article-body p` / `article p` + og: meta tags) is unaffected. Fix: replace both homepage parsers with a shared Schibsted parser keyed on stable hooks (`a[data-content-type="article"]` for links, `h2[aria-label]` for titles), host-filtered per site. Refresh test fixtures.
arne closed this issue 2026-06-15 21:50:14 +02:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
arne/news#11
No description provided.