From ea0e37aa491ccb3329a8aaf4ec092fe68e05bbfa Mon Sep 17 00:00:00 2001 From: Niels Simenon Date: Sat, 7 Mar 2020 00:32:04 +0100 Subject: [PATCH] Fixed Vivid requesting unavailable HTTPS resource, and breaking on non-existing parameters object. --- seeds/02_sites.js | 20 ++++++++++---------- src/scrapers/vivid.js | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 1bc45330..ea7b1ca6 100644 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -5541,7 +5541,7 @@ const sites = [ { slug: 'nineteen', name: 'Nineteen', - url: 'https://www.nineteen.com', + url: 'http://www.nineteen.com', network: 'vivid', parameters: { referer: 'https://www.thebrats.com', @@ -5553,7 +5553,7 @@ const sites = [ { slug: 'nastystepfamily', name: 'Nasty Step Family', - url: 'https://www.nastystepfamily.com', + url: 'http://www.nastystepfamily.com', network: 'vivid', parameters: { referer: 'https://www.thebrats.com', @@ -5565,7 +5565,7 @@ const sites = [ { slug: 'girlswhofuckgirls', name: 'Girls Who Fuck Girls', - url: 'https://www.girlswhofuckgirls.com', + url: 'http://www.girlswhofuckgirls.com', network: 'vivid', parameters: { referer: 'https://www.thebrats.com', @@ -5577,7 +5577,7 @@ const sites = [ { slug: 'petited', name: 'Petited', - url: 'https://www.petited.com', + url: 'http://www.petited.com', network: 'vivid', parameters: { referer: 'https://www.thebrats.com', @@ -5589,7 +5589,7 @@ const sites = [ { slug: 'orgytrain', name: 'Orgy Train', - url: 'https://www.orgytrain.com', + url: 'http://www.orgytrain.com', network: 'vivid', parameters: { referer: 'https://www.thebrats.com', @@ -5601,7 +5601,7 @@ const sites = [ { slug: 'momisamilf', name: 'Mom Is A MILF', - url: 'https://www.momisamilf.com', + url: 'http://www.momisamilf.com', network: 'vivid', parameters: { referer: 'https://www.thebrats.com', @@ -5613,7 +5613,7 @@ const sites = [ { slug: 'blackwhitefuckfest', name: 'Black White Fuck Fest', - url: 'https://www.blackwhitefuckfest.com', + url: 'http://www.blackwhitefuckfest.com', network: 'vivid', parameters: { referer: 'https://www.thebrats.com', @@ -5625,7 +5625,7 @@ const sites = [ { slug: '65inchhugeasses', name: '65 Inch Huge Asses', - url: 'https://www.65inchhugeasses.com', + url: 'http://www.65inchhugeasses.com', network: 'vivid', parameters: { referer: 'https://www.thebrats.com', @@ -5637,7 +5637,7 @@ const sites = [ { slug: 'brandnewfaces', name: 'Brand New Faces', - url: 'https://www.brandnewfaces.com', + url: 'http://www.brandnewfaces.com', network: 'vivid', parameters: { referer: 'https://www.thebrats.com', @@ -5649,7 +5649,7 @@ const sites = [ { slug: 'vividclassic', name: 'Vivid Classic', - url: 'https://www.vividclassic.com', + url: 'http://www.vividclassic.com', network: 'vivid', parameters: { referer: 'https://www.thebrats.com', diff --git a/src/scrapers/vivid.js b/src/scrapers/vivid.js index 5d80f291..b844bc78 100644 --- a/src/scrapers/vivid.js +++ b/src/scrapers/vivid.js @@ -104,7 +104,7 @@ async function fetchSceneNative(url, site, release) { async function fetchSceneWrapper(url, site, release) { const scene = await fetchScene(url, site, release); - if (scene.date - new Date(site.parameters.lastNative) <= 0) { + if (scene.date - new Date(site.parameters?.lastNative) <= 0) { // scene is probably still available on Vivid site, use search API to get URL and original date const searchUrl = `${site.url}/videos/api/?limit=10&sort=datedesc&search=${encodeURI(scene.title)}`; const searchRes = await bhttp.get(searchUrl, {