Compare commits

..

No commits in common. "756ab09ce6b2f075011590e921e2bcc817614bd7" and "82e8ce432b3d3533b435b9da3e628a89c00b09ee" have entirely different histories.

3 changed files with 14651 additions and 11932 deletions

26564
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.101.1",
"version": "1.101.0",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {
@ -92,7 +92,6 @@
"longjohn": "^0.2.12",
"mime": "^2.4.4",
"moment": "^2.24.0",
"opencv4nodejs": "^5.5.0",
"opn": "^5.5.0",
"pg": "^7.18.1",
"postgraphile": "^4.5.5",

View File

@ -149,7 +149,7 @@ async function fetchActorReleases(url, accReleases = []) {
return null;
}
async function scrapeProfile(html, actorUrl, withReleases) {
async function scrapeProfile(html, actorUrl) {
const { q, qa, qi } = ex(html, '#model-page');
const profile = { gender: 'female' };
@ -187,10 +187,8 @@ async function scrapeProfile(html, actorUrl, withReleases) {
const avatar = qi('img');
if (avatar) profile.avatar = avatar;
if (withReleases) {
const { origin, pathname } = new URL(actorUrl);
profile.releases = await fetchActorReleases(`${origin}${pathname}/scenes?page=1`);
}
const { origin, pathname } = new URL(actorUrl);
profile.releases = await fetchActorReleases(`${origin}${pathname}/scenes?page=1`);
return profile;
}
@ -217,7 +215,7 @@ async function fetchScene(url, site) {
return null;
}
async function fetchProfile(actorName, scraperSlug, site, withReleases, page = 1, source = 0) {
async function fetchProfile(actorName, scraperSlug, page = 1, source = 0) {
const letter = actorName.charAt(0).toUpperCase();
const sources = [
@ -238,17 +236,17 @@ async function fetchProfile(actorName, scraperSlug, site, withReleases, page = 1
const actorRes = await bhttp.get(actorUrl);
if (actorRes.statusCode === 200) {
return scrapeProfile(actorRes.body.toString(), actorUrl, withReleases);
return scrapeProfile(actorRes.body.toString(), actorUrl);
}
return null;
}
return fetchProfile(actorName, scraperSlug, site, withReleases, page + 1, source);
return fetchProfile(actorName, scraperSlug, page + 1, source);
}
if (sources[source + 1]) {
return fetchProfile(actorName, scraperSlug, site, withReleases, 1, source + 1);
return fetchProfile(actorName, scraperSlug, 1, source + 1);
}
return null;