From f8a3bf6a64707614fae829cbc50b4db01ae47708 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Thu, 22 Apr 2021 19:49:11 +0200 Subject: [PATCH] Updated scene URLs in Vixen scraper. --- src/scrapers/vixen.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scrapers/vixen.js b/src/scrapers/vixen.js index 22086a40..551f00cb 100644 --- a/src/scrapers/vixen.js +++ b/src/scrapers/vixen.js @@ -142,7 +142,7 @@ function scrapeAll(scenes, site, origin) { release.title = scene.title; release.entryId = String(scene.newId); - release.url = `${site?.url || origin}${scene.targetUrl}`; + release.url = `${site?.url || origin}/videos${scene.targetUrl}`; release.date = moment.utc(scene.releaseDate).toDate(); release.datePrecision = 'minute'; @@ -168,7 +168,7 @@ function scrapeUpcoming(scene, site) { .map(component => `${component.charAt(0).toUpperCase()}${component.slice(1)}`) .join(' '); - release.url = `${site.url}${scene.targetUrl}`; + release.url = `${site.url}/videos${scene.targetUrl}`; release.date = moment.utc(scene.releaseDate).toDate(); release.datePrecision = 'minute'; @@ -302,7 +302,7 @@ async function fetchUpcoming(site) { async function fetchScene(url, site, baseRelease) { const { origin, pathname } = new URL(url); - const apiUrl = `${origin}/api${pathname}`; + const apiUrl = `${origin}/api/${pathname.split('/').slice(-1)[0]}`; const res = await http.get(apiUrl);