From b3a5d7f379e59057036bf984e5111ddb8b507430 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Fri, 13 Nov 2020 01:23:06 +0100 Subject: [PATCH] Fixed JayRock status response, --- seeds/02_sites.js | 2 +- src/scrapers/jayrock.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 2448c469..112ff34c 100644 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -3447,7 +3447,7 @@ const sites = [ name: 'Jay\'s POV', url: 'https://jayspov.net', parent: 'jayrock', - /* more recent scenes on own site + /* available on Gamma, but own site seems more recent parameters: { referer: 'https://www.21sextury.com', scene: false, diff --git a/src/scrapers/jayrock.js b/src/scrapers/jayrock.js index 280381ee..b01e86dc 100644 --- a/src/scrapers/jayrock.js +++ b/src/scrapers/jayrock.js @@ -170,11 +170,11 @@ async function fetchLatestApi(channel, page = 1) { const url = `${channel.url}/sapi/${token}/${time}/content.load?limit=50&offset=${(page - 1) * 50}&transitParameters[v1]=OhUOlmasXD&transitParameters[v2]=OhUOlmasXD&transitParameters[preset]=videos`; const res = await http.get(url); - if (res.statusCode === 200 && res.body.status) { + if (res.ok && res.body.status) { return scrapeLatestApi(res.body.response.collection, channel, { time, token }); } - return null; + return res.ok ? res.body.status : res.status; } async function fetchLatest(channel, page = 1, options, preData) {