Fixed indentation.

This commit is contained in:
DebaucheryLibrarian 2021-02-21 22:58:46 +01:00
parent c0347eed50
commit b79e75349c
5 changed files with 15 additions and 10 deletions

View File

@ -4,10 +4,10 @@ const { get, geta, ctxa } = require('../utils/q');
function extractActors(actorString) {
return actorString
?.replace(/.*:|\(.*\)|\d+(-|\s)year(-|\s)old|nurses?|tangled/ig, '') // remove Patient:, (date) and other nonsense
.split(/\band\b|\bvs\b|\/|,|&/ig)
.map(actor => actor.trim())
.filter(actor => !!actor && !/\banal\b|\bschool\b|\bgamer\b|\breturn\b|\bfor\b|\bare\b|\bpart\b|realdoll|bimbo|p\d+/ig.test(actor))
?.replace(/.*:|\(.*\)|\d+(-|\s)year(-|\s)old|nurses?|tangled/ig, '') // remove Patient:, (date) and other nonsense
.split(/\band\b|\bvs\b|\/|,|&/ig)
.map(actor => actor.trim())
.filter(actor => !!actor && !/\banal\b|\bschool\b|\bgamer\b|\breturn\b|\bfor\b|\bare\b|\bpart\b|realdoll|bimbo|p\d+/ig.test(actor))
|| [];
}

View File

@ -28,8 +28,8 @@ function scrapeProfile(html) {
if (bio.Measurements) {
const measurements = bio.Measurements
.match(/\d+(\w+)?-\d+-\d+/g)
?.slice(-1)[0] // allow for both '34C-25-36' and '86-64-94 cm / 34-25-37 in'
.split('-');
?.slice(-1)[0] // allow for both '34C-25-36' and '86-64-94 cm / 34-25-37 in'
.split('-');
// account for measuemrents being just e.g. '32EE'
if (measurements) {

View File

@ -77,7 +77,7 @@ async function fetchClassicProfile(actorName, { site }) {
const actorPath = pornstarsRes.item.qa('option[value*="/pornstar"]')
.find(el => slugify(el.textContent) === actorSlug)
?.value;
?.value;
if (actorPath) {
const actorUrl = `${site.url}${actorPath}`;

View File

@ -200,6 +200,8 @@ function scrapeAll(html, site, networkUrl, hasTeaser = true) {
];
}
console.log(release);
return release;
});
}
@ -252,7 +254,10 @@ async function scrapeScene(html, url, site, baseRelease, mobileHtml, options) {
const channel = data?.productionCompany?.name
|| $('.studioLink a, .siteLink a').attr('title')?.trim()
|| $('.siteNameSpan').text()?.trim().toLowerCase().replace('.com', '')
|| $('.siteNameSpan').text()
?.trim()
.toLowerCase()
.replace('.com', '')
|| $('meta[name="twitter:domain"]').attr('content')?.replace('.com', '');
if (channel) release.channel = slugify(channel, '');

View File

@ -305,8 +305,8 @@ function scrapeMovie({ el, query }, url, site) {
const scenes = scrapeAll(sceneQus, site);
const curatedScenes = scenes
?.map(scene => ({ ...scene, movie }))
.sort((sceneA, sceneB) => sceneA.date - sceneB.date);
?.map(scene => ({ ...scene, movie }))
.sort((sceneA, sceneB) => sceneA.date - sceneB.date);
movie.date = curatedScenes?.[0].date;