Fixed unnecessary property errors, updated unprint to address HTTP JSON response header issue.
This commit is contained in:
@@ -86,7 +86,7 @@ function scrapeAll(scenes, channel) {
|
||||
}
|
||||
|
||||
async function fetchLatest(channel, page = 1) {
|
||||
if (!channel.parameters.studioId) {
|
||||
if (!channel.parameters?.studioId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ async function scrapeReleases(scraper, entity, preData, isUpcoming) {
|
||||
? await scraper.fetchUpcoming(entity, page, options, preData)
|
||||
: await scraper.fetchLatest(entity, page, options, preData);
|
||||
|
||||
const pageReleases = rawPageReleases.scenes || rawPageReleases;
|
||||
const pageReleases = rawPageReleases?.scenes || rawPageReleases;
|
||||
|
||||
if (!Array.isArray(pageReleases)) {
|
||||
// scraper is unable to fetch the releases and returned a HTTP code or null
|
||||
|
||||
Reference in New Issue
Block a user