Skip to content

fix(scraper): extract real artist slugs and parse current uploader markup - #7

Merged
ghostcoder42 merged 1 commit into
mainfrom
fix/artist-model-navigation
Sep 3, 2026
Merged

ghostcoder42 merged 1 commit into
mainfrom
fix/artist-model-navigation

Conversation

@ghostcoder42

Copy link
Copy Markdown
Owner

Tapping an artist on the video page led to a model list without the current video — usually a 404 rendered as an error screen. Two defects:

  1. The artist regex targeted the old markup (class="item btn_link" with the name span directly inside). The site now renders vote-chip pills (class="item btn_link video_meta_pill" with a wrap_image div before the span), so artist extraction never matched and the chip disappeared entirely.
  2. Navigation derived the model slug from the display name (toLowerCase + dashes), which 404s for names like "OpenNSFW (VA)" whose real site slug is "opennsfw".

parseVideoDetail now collects every model pill into an artists[] (name + slug taken from the site's own href), which the post page renders as one chip per artist. The sidebar's "Top Artists" links (class="item", no btn_link) are excluded, and each name is bound to its own anchor so adjacent pills can't bleed into each other. The uploader regex is tightened the same way (name bound to the member anchor, avatar alt first, plain text fallback for avatar-less members) instead of lazily scanning for the next alt attribute in the whole document.

Artist chips promote a known role suffix from the model's display name to the label prefix — "OpenNSFW (VA)" renders as "VA: OpenNSFW", "HentAudio (Audio)" as "Audio: HentAudio"; plain names keep the "Artist: Name" prefix. Unknown parentheticals stay part of the name.

…rkup

Tapping an artist on the video page led to a model list without the
current video — usually a 404 rendered as an error screen. Two defects:

1. The artist regex targeted the old markup (class="item btn_link"
   with the name span directly inside). The site now renders vote-chip
   pills (class="item btn_link video_meta_pill" with a wrap_image div
   before the span), so artist extraction never matched and the chip
   disappeared entirely.
2. Navigation derived the model slug from the display name
   (toLowerCase + dashes), which 404s for names like "OpenNSFW (VA)"
   whose real site slug is "opennsfw".

parseVideoDetail now collects every model pill into an artists[]
(name + slug taken from the site's own href), which the post page
renders as one chip per artist. The sidebar's "Top Artists" links
(class="item", no btn_link) are excluded, and each name is bound to
its own anchor so adjacent pills can't bleed into each other. The
uploader regex is tightened the same way (name bound to the member
anchor, avatar alt first, plain text fallback for avatar-less
members) instead of lazily scanning for the next alt attribute in the
whole document.

Artist chips promote a known role suffix from the model's display
name to the label prefix — "OpenNSFW (VA)" renders as "VA: OpenNSFW",
"HentAudio (Audio)" as "Audio: HentAudio"; plain names keep the
"Artist: Name" prefix. Unknown parentheticals stay part of the name.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

💯 Test Coverage

Lines Statements Branches Functions
Coverage: 52%
52.1% (818/1570) 44.01% (408/927) 42.77% (216/505)

😎 Tests Results

Tests Skipped Failures Errors Time
264 0 💤 0 ❌ 0 🔥 14.123s ⏱️
👀 Tests Details • (52%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files52.144.0142.7752.57 
src/app/post89.1576.538091.17 
   [id].tsx89.1576.538091.17195, 268, 278, 317–396
src/lib/r3483.5376.6172.7284.31 
   artists.ts100100100100 
   offline-detail.ts100100100100 
   scraper.ts81.65727083.169–38, 114–117
   types.ts0000 

@ghostcoder42
ghostcoder42 merged commit 0ebdf1f into main Sep 3, 2026
1 check passed
@ghostcoder42
ghostcoder42 deleted the fix/artist-model-navigation branch September 3, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant