Compare commits
No commits in common. "756ab09ce6b2f075011590e921e2bcc817614bd7" and "82e8ce432b3d3533b435b9da3e628a89c00b09ee" have entirely different histories.
756ab09ce6
...
82e8ce432b
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.101.1",
|
"version": "1.101.0",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -92,7 +92,6 @@
|
||||||
"longjohn": "^0.2.12",
|
"longjohn": "^0.2.12",
|
||||||
"mime": "^2.4.4",
|
"mime": "^2.4.4",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"opencv4nodejs": "^5.5.0",
|
|
||||||
"opn": "^5.5.0",
|
"opn": "^5.5.0",
|
||||||
"pg": "^7.18.1",
|
"pg": "^7.18.1",
|
||||||
"postgraphile": "^4.5.5",
|
"postgraphile": "^4.5.5",
|
||||||
|
|
|
@ -149,7 +149,7 @@ async function fetchActorReleases(url, accReleases = []) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function scrapeProfile(html, actorUrl, withReleases) {
|
async function scrapeProfile(html, actorUrl) {
|
||||||
const { q, qa, qi } = ex(html, '#model-page');
|
const { q, qa, qi } = ex(html, '#model-page');
|
||||||
const profile = { gender: 'female' };
|
const profile = { gender: 'female' };
|
||||||
|
|
||||||
|
@ -187,10 +187,8 @@ async function scrapeProfile(html, actorUrl, withReleases) {
|
||||||
const avatar = qi('img');
|
const avatar = qi('img');
|
||||||
if (avatar) profile.avatar = avatar;
|
if (avatar) profile.avatar = avatar;
|
||||||
|
|
||||||
if (withReleases) {
|
const { origin, pathname } = new URL(actorUrl);
|
||||||
const { origin, pathname } = new URL(actorUrl);
|
profile.releases = await fetchActorReleases(`${origin}${pathname}/scenes?page=1`);
|
||||||
profile.releases = await fetchActorReleases(`${origin}${pathname}/scenes?page=1`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
@ -217,7 +215,7 @@ async function fetchScene(url, site) {
|
||||||
return null;
|
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 letter = actorName.charAt(0).toUpperCase();
|
||||||
|
|
||||||
const sources = [
|
const sources = [
|
||||||
|
@ -238,17 +236,17 @@ async function fetchProfile(actorName, scraperSlug, site, withReleases, page = 1
|
||||||
const actorRes = await bhttp.get(actorUrl);
|
const actorRes = await bhttp.get(actorUrl);
|
||||||
|
|
||||||
if (actorRes.statusCode === 200) {
|
if (actorRes.statusCode === 200) {
|
||||||
return scrapeProfile(actorRes.body.toString(), actorUrl, withReleases);
|
return scrapeProfile(actorRes.body.toString(), actorUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return fetchProfile(actorName, scraperSlug, site, withReleases, page + 1, source);
|
return fetchProfile(actorName, scraperSlug, page + 1, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sources[source + 1]) {
|
if (sources[source + 1]) {
|
||||||
return fetchProfile(actorName, scraperSlug, site, withReleases, 1, source + 1);
|
return fetchProfile(actorName, scraperSlug, 1, source + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue