Compare commits

..

No commits in common. "7d0cf0f10017e62ebd5a42613f650730541184ab" and "3891a6e86b3acb2713e7c2b1dfcaaa87110e1a00" have entirely different histories.

4 changed files with 11 additions and 18 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.62.4",
"version": "1.62.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.62.4",
"version": "1.62.3",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -339,18 +339,13 @@ async function scrapeActors(actorNames) {
const sources = argv.sources ? argv.sources.map(source => [source, scrapers.actors[source]]) : Object.entries(scrapers.actors);
const profiles = await Promise.map(sources, async ([scraperSlug, scraper]) => {
try {
const profile = await scraper.fetchProfile(actorEntry ? actorEntry.name : actorName);
const profile = await scraper.fetchProfile(actorEntry ? actorEntry.name : actorName);
return {
...profile,
name: actorName,
scraper: scraperSlug,
};
} catch (error) {
console.log(scraperSlug, error);
return null;
}
return {
...profile,
name: actorName,
scraper: scraperSlug,
};
});
const profile = await mergeProfiles(profiles, actorEntry);

View File

@ -7,9 +7,9 @@ function q(context, selector, attrArg, trim = true) {
const attr = attrArg === true ? 'textContent' : attrArg;
if (attr) {
const value = context.querySelector(selector)?.[attr];
const value = context.querySelector(selector)[attr];
return trim ? value?.trim() : value;
return trim ? value.trim() : value;
}
return context.querySelector(selector);
@ -26,9 +26,7 @@ function qall(context, selector, attrArg, trim = true) {
}
function qdate(context, selector, format, match, attr = 'textContent') {
const dateString = context.querySelector(selector)?.[attr];
if (!dateString) return null;
const dateString = context.querySelector(selector)[attr];
if (match) {
const dateStamp = dateString.match(match);