Added Reality Kings scraper. Improved site finder.
This commit is contained in:
@@ -12,11 +12,11 @@ function scrapeLatest(html, site) {
|
||||
const sceneElements = $('.scenes-latest').toArray();
|
||||
|
||||
return sceneElements.map((element) => {
|
||||
const actors = $('.actors a').map((actorIndex, actorElement) => $(actorElement).text()).toArray();
|
||||
const actors = $(element).find('.actors a').map((actorIndex, actorElement) => $(actorElement).text()).toArray();
|
||||
|
||||
return {
|
||||
url,
|
||||
shootId,
|
||||
entryId,
|
||||
title,
|
||||
actors,
|
||||
date,
|
||||
@@ -35,11 +35,11 @@ function scrapeUpcoming(html, site) {
|
||||
const sceneElements = $('.scenes-upcoming').toArray();
|
||||
|
||||
return sceneElements.map((element) => {
|
||||
const actors = $('.actors a').map((actorIndex, actorElement) => $(actorElement).text()).toArray();
|
||||
const actors = $(element).find('.actors a').map((actorIndex, actorElement) => $(actorElement).text()).toArray();
|
||||
|
||||
return {
|
||||
url,
|
||||
shootId,
|
||||
entryId,
|
||||
title,
|
||||
actors,
|
||||
date,
|
||||
@@ -56,9 +56,6 @@ function scrapeUpcoming(html, site) {
|
||||
async function scrapeScene(html, url, site) {
|
||||
const $ = cheerio.load(html, { normalizeWhitespace: true });
|
||||
|
||||
const rawTags = [];
|
||||
const tags = await matchTags(rawTags);
|
||||
|
||||
const actors = $('.actors a').map((actorIndex, actorElement) => $(actorElement).text()).toArray();
|
||||
|
||||
const rawTags = $('.tags a').map((tagIndex, tagElement) => $(tagElement).text()).toArray();
|
||||
@@ -66,7 +63,7 @@ async function scrapeScene(html, url, site) {
|
||||
|
||||
return {
|
||||
url,
|
||||
shootId,
|
||||
entryId,
|
||||
title,
|
||||
description,
|
||||
actors,
|
||||
|
||||
Reference in New Issue
Block a user