Fixed Vixen scraper, site restructured. Added Deeper to Vixen network.

This commit is contained in:
2019-09-25 02:44:25 +02:00
parent c78f7f957f
commit b12d74cbb3
2 changed files with 17 additions and 5 deletions

View File

@@ -42,13 +42,17 @@ async function scrapeScene(html, url, site) {
const stateObject = $('script:contains("INITIAL_STATE")');
const data = JSON.parse(stateObject.html().trim().slice(27, -1));
const scene = data.page.data[`${pathname}${search}`].data.video;
const shootId = data.page.data[`${pathname}${search}`].data.video;
const scene = data.videos.find(video => video.newId === shootId);
const {
title,
description,
models: actors,
totalRateVal: stars,
} = scene;
const shootId = String(scene.newId);
const { title } = scene;
const date = new Date(scene.releaseDate);
const actors = scene.models;
const stars = scene.totalRateVal;
const rawTags = scene.tags;
const tags = await matchTags(rawTags);
@@ -60,6 +64,7 @@ async function scrapeScene(html, url, site) {
url,
shootId,
title,
description,
actors,
director,
date,