From 2a12f5ca1db07ebd1e7dcf9f3b7054b4bdf142df Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Fri, 23 Jan 2026 02:34:37 +0100 Subject: [PATCH] Automatically linking VR scenes to NaughtyAmericaVR.com. --- src/scrapers/naughtyamerica.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/scrapers/naughtyamerica.js b/src/scrapers/naughtyamerica.js index 01d98b7b..4f8ae366 100755 --- a/src/scrapers/naughtyamerica.js +++ b/src/scrapers/naughtyamerica.js @@ -10,7 +10,6 @@ function scrapeLatest(scenes, channel) { const release = {}; const url = query.url('a'); - release.url = url; release.entryId = query.attribute('a', 'data-scene-id') || (url && new URL(url).pathname.match(/-(\d+)$/)?.[1]) || null; release.date = query.date('.entry-date, .scene-date', 'MMM D, YYYY'); @@ -43,6 +42,11 @@ function scrapeLatest(scenes, channel) { release.channel = slugify(query.content('.site-title'), ''); + // NA affiliate prefers to push more traffic to Naughty America VR, all scenes labeled VR seem to be available on NAVR + release.url = release.tags?.some((tag) => tag.toLowerCase() === 'vr') + ? url.replace('naughtyamerica.com', 'naughtyamericavr.com') + : url; + return release; }); } @@ -124,7 +128,8 @@ function scrapeScene({ query }, { url }) { } async function fetchScene(url, _channel) { - const res = await unprint.browserRequest(url, { + // latest set NaughtyAmericaVR URL, but try deep scrape from regular NA website + const res = await unprint.browserRequest(url.replace('naughtyamericavr.com', 'naughtyamerica.com'), { async control(ctx) { await ctx.locator('.scene-info, .scene').first().hover({ trial: true, timeout: 30000 }); // wait for trailer to initialize },