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',
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',

View File

@ -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, {