Added Brazzers scraper. Removed scene-only sites in database in favor of automatic network fallback.

This commit is contained in:
2019-04-04 20:22:47 +02:00
parent 784542253b
commit 6190247ac5
9 changed files with 494 additions and 29 deletions

View File

@@ -57,13 +57,16 @@ async function scrapeScene(html, url, site) {
const siteElement = $('.content-wrapper .logos-sites a');
const siteUrl = siteElement.attr('href').slice(0, -1);
const siteName = siteElement.text();
const channelSite = await knex('sites')
.where({ url: siteUrl })
.orWhere({ name: siteName })
.first();
const rawTags = $('.content-desc .scene-tags a').map((tagIndex, tagElement) => $(tagElement).text()).toArray();
const tags = await matchTags(rawTags);
const [tags, channelSite] = await Promise.all([
matchTags(rawTags),
knex('sites')
.where({ url: siteUrl })
.orWhere({ name: siteName })
.first(),
]);
return {
url,