diff --git a/src/scrapers/rickysroom.js b/src/scrapers/rickysroom.js index 6530cbaf..f3c81633 100755 --- a/src/scrapers/rickysroom.js +++ b/src/scrapers/rickysroom.js @@ -23,7 +23,7 @@ function scrapeScene(data, channel) { release.tags = data.tags; release.poster = [data.trailer_screencap].concat(data.extra_thumbnails); - release.photos = data.previews.full + release.photos = data.previews?.full .map((url) => [url, url.replace('full/', 'thumbs/')]) // photos .concat(data.thumbs); // screenshots @@ -69,7 +69,9 @@ async function fetchLatest(channel, page = 1) { const data = dataString && JSON.parse(dataString); if (data.props?.pageProps?.contents?.data) { - return data.props.pageProps.contents.data.map((scene) => scrapeScene(scene, channel)); + const scenes = data.props.pageProps.contents.data.map((scene) => scrapeScene(scene, channel)); + + return scenes; } return null;