Fixed Vivid requesting unavailable HTTPS resource, and breaking on non-existing parameters object.

This commit is contained in:
ThePendulum 2020-03-07 00:32:04 +01:00
parent 2791821239
commit ea0e37aa49
2 changed files with 11 additions and 11 deletions

View File

@ -5541,7 +5541,7 @@ const sites = [
{ {
slug: 'nineteen', slug: 'nineteen',
name: 'Nineteen', name: 'Nineteen',
url: 'https://www.nineteen.com', url: 'http://www.nineteen.com',
network: 'vivid', network: 'vivid',
parameters: { parameters: {
referer: 'https://www.thebrats.com', referer: 'https://www.thebrats.com',
@ -5553,7 +5553,7 @@ const sites = [
{ {
slug: 'nastystepfamily', slug: 'nastystepfamily',
name: 'Nasty Step Family', name: 'Nasty Step Family',
url: 'https://www.nastystepfamily.com', url: 'http://www.nastystepfamily.com',
network: 'vivid', network: 'vivid',
parameters: { parameters: {
referer: 'https://www.thebrats.com', referer: 'https://www.thebrats.com',
@ -5565,7 +5565,7 @@ const sites = [
{ {
slug: 'girlswhofuckgirls', slug: 'girlswhofuckgirls',
name: 'Girls Who Fuck Girls', name: 'Girls Who Fuck Girls',
url: 'https://www.girlswhofuckgirls.com', url: 'http://www.girlswhofuckgirls.com',
network: 'vivid', network: 'vivid',
parameters: { parameters: {
referer: 'https://www.thebrats.com', referer: 'https://www.thebrats.com',
@ -5577,7 +5577,7 @@ const sites = [
{ {
slug: 'petited', slug: 'petited',
name: 'Petited', name: 'Petited',
url: 'https://www.petited.com', url: 'http://www.petited.com',
network: 'vivid', network: 'vivid',
parameters: { parameters: {
referer: 'https://www.thebrats.com', referer: 'https://www.thebrats.com',
@ -5589,7 +5589,7 @@ const sites = [
{ {
slug: 'orgytrain', slug: 'orgytrain',
name: 'Orgy Train', name: 'Orgy Train',
url: 'https://www.orgytrain.com', url: 'http://www.orgytrain.com',
network: 'vivid', network: 'vivid',
parameters: { parameters: {
referer: 'https://www.thebrats.com', referer: 'https://www.thebrats.com',
@ -5601,7 +5601,7 @@ const sites = [
{ {
slug: 'momisamilf', slug: 'momisamilf',
name: 'Mom Is A MILF', name: 'Mom Is A MILF',
url: 'https://www.momisamilf.com', url: 'http://www.momisamilf.com',
network: 'vivid', network: 'vivid',
parameters: { parameters: {
referer: 'https://www.thebrats.com', referer: 'https://www.thebrats.com',
@ -5613,7 +5613,7 @@ const sites = [
{ {
slug: 'blackwhitefuckfest', slug: 'blackwhitefuckfest',
name: 'Black White Fuck Fest', name: 'Black White Fuck Fest',
url: 'https://www.blackwhitefuckfest.com', url: 'http://www.blackwhitefuckfest.com',
network: 'vivid', network: 'vivid',
parameters: { parameters: {
referer: 'https://www.thebrats.com', referer: 'https://www.thebrats.com',
@ -5625,7 +5625,7 @@ const sites = [
{ {
slug: '65inchhugeasses', slug: '65inchhugeasses',
name: '65 Inch Huge Asses', name: '65 Inch Huge Asses',
url: 'https://www.65inchhugeasses.com', url: 'http://www.65inchhugeasses.com',
network: 'vivid', network: 'vivid',
parameters: { parameters: {
referer: 'https://www.thebrats.com', referer: 'https://www.thebrats.com',
@ -5637,7 +5637,7 @@ const sites = [
{ {
slug: 'brandnewfaces', slug: 'brandnewfaces',
name: 'Brand New Faces', name: 'Brand New Faces',
url: 'https://www.brandnewfaces.com', url: 'http://www.brandnewfaces.com',
network: 'vivid', network: 'vivid',
parameters: { parameters: {
referer: 'https://www.thebrats.com', referer: 'https://www.thebrats.com',
@ -5649,7 +5649,7 @@ const sites = [
{ {
slug: 'vividclassic', slug: 'vividclassic',
name: 'Vivid Classic', name: 'Vivid Classic',
url: 'https://www.vividclassic.com', url: 'http://www.vividclassic.com',
network: 'vivid', network: 'vivid',
parameters: { parameters: {
referer: 'https://www.thebrats.com', referer: 'https://www.thebrats.com',

View File

@ -104,7 +104,7 @@ async function fetchSceneNative(url, site, release) {
async function fetchSceneWrapper(url, site, release) { async function fetchSceneWrapper(url, site, release) {
const scene = await fetchScene(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 // 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 searchUrl = `${site.url}/videos/api/?limit=10&sort=datedesc&search=${encodeURI(scene.title)}`;
const searchRes = await bhttp.get(searchUrl, { const searchRes = await bhttp.get(searchUrl, {