From 844c1d87a6dac3d34aba41b0f04cd3594f4bfe7e Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Tue, 19 Nov 2024 04:05:17 +0100 Subject: [PATCH] Fixed Aylo scraper using spartan ID in URLs; should only be used for unique identifier. --- src/scrapers/aylo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scrapers/aylo.js b/src/scrapers/aylo.js index 850ddf08..ba4e398b 100755 --- a/src/scrapers/aylo.js +++ b/src/scrapers/aylo.js @@ -81,7 +81,7 @@ function scrapeLatestX(data, site, filterChannel, options) { const basepath = getBasePath(site); - release.url = `${basepath}/${release.entryId}/${slugify(release.title)}`; + release.url = `${basepath}/${data.id}/${slugify(release.title)}`; // spartanId doesn't work in URLs release.date = new Date(data.dateReleased); release.duration = data.videos.mediabook?.length > 1 ? data.videos.mediabook.length : null; @@ -128,7 +128,7 @@ async function scrapeLatest(items, site, filterChannel, options) { function scrapeRelease(data, url, channel, networkName, options) { const release = {}; - const { id: entryId, title, description } = data; + const { title, description } = data; release.entryId = (options?.parameters.preferSpartanId && data.spartanId) || data.id; release.title = title; @@ -156,7 +156,7 @@ function scrapeRelease(data, url, channel, networkName, options) { const siteName = data.collections[0]?.name || data.brand; release.channel = slugify(siteName, ''); - release.url = url || `https://www.${networkName || data.brand}.com/scene/${entryId}/`; + release.url = url || `https://www.${networkName || data.brand}.com/scene/${data.id}/`; // spartanId is invalid in URLs if (data.parent?.type === 'movie' || data.parent?.type === 'serie') { release[data.parent.type] = {