forked from DebaucheryLibrarian/traxxx
Removed release_date selection, not working as desired. Removed site and tag fetching from Kink scraper.
This commit is contained in:
@@ -4,9 +4,6 @@ const bhttp = require('bhttp');
|
||||
const cheerio = require('cheerio');
|
||||
const moment = require('moment');
|
||||
|
||||
const { fetchSites } = require('../sites');
|
||||
const { matchTags } = require('../tags');
|
||||
|
||||
function scrapeLatest(html, site) {
|
||||
const $ = cheerio.load(html, { normalizeWhitespace: true });
|
||||
const sceneElements = $('.shoot-list .shoot').toArray();
|
||||
@@ -73,17 +70,9 @@ async function scrapeScene(html, url, shootId, ratingRes, site) {
|
||||
|
||||
const siteName = $('.shoot-logo a').attr('href').split('/')[2];
|
||||
const siteSlug = siteName.replace(/\s+/g, '').toLowerCase();
|
||||
const rawTags = $('.tag-list > a[href*="/tag"]').map((tagIndex, tagElement) => $(tagElement).text()).toArray();
|
||||
|
||||
const [[channelSite], tags] = await Promise.all([
|
||||
site.isFallback
|
||||
? fetchSites({
|
||||
slug: siteSlug,
|
||||
name: siteName,
|
||||
})
|
||||
: [site],
|
||||
matchTags(rawTags),
|
||||
]);
|
||||
const tags = $('.tag-list > a[href*="/tag"]').map((tagIndex, tagElement) => $(tagElement).text()).toArray();
|
||||
const channel = siteSlug;
|
||||
|
||||
return {
|
||||
url,
|
||||
@@ -103,7 +92,8 @@ async function scrapeScene(html, url, shootId, ratingRes, site) {
|
||||
stars,
|
||||
},
|
||||
tags,
|
||||
site: channelSite || site,
|
||||
site,
|
||||
channel,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user