Compare commits
2 Commits
ed1bc6c73f
...
db14eaa5f9
Author | SHA1 | Date |
---|---|---|
|
db14eaa5f9 | |
|
054dfba6b5 |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.79.3",
|
"version": "1.79.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.79.3",
|
"version": "1.79.4",
|
||||||
"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": {
|
||||||
|
|
|
@ -139,7 +139,7 @@ async function fetchActorReleases(url, accReleases = []) {
|
||||||
const releases = accReleases.concat(scrapeAll(document.body.outerHTML));
|
const releases = accReleases.concat(scrapeAll(document.body.outerHTML));
|
||||||
const nextPage = qu('.next-pg');
|
const nextPage = qu('.next-pg');
|
||||||
|
|
||||||
if (nextPage && new URL(nextPage).searchParams.has('page')) {
|
if (nextPage && new URL(nextPage).searchParams.has('page')) { // last page has 'next' button linking to join page
|
||||||
return fetchActorReleases(nextPage, releases);
|
return fetchActorReleases(nextPage, releases);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ async function fetchActorReleases(url, accReleases = []) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function scrapeProfile(html) {
|
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) {
|
||||||
const avatar = qi('img');
|
const avatar = qi('img');
|
||||||
if (avatar) profile.avatar = avatar;
|
if (avatar) profile.avatar = avatar;
|
||||||
|
|
||||||
const { qu } = ex(html, '#model-page + .container, #model-page + .container-fluid');
|
const { origin, pathname } = new URL(actorUrl);
|
||||||
const releasesPage = qu('.next-pg');
|
profile.releases = await fetchActorReleases(`${origin}${pathname}/scenes?page=1`);
|
||||||
|
|
||||||
if (releasesPage) profile.releases = await fetchActorReleases(releasesPage);
|
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
@ -238,7 +236,7 @@ async function fetchProfile(actorName, scraperSlug, page = 1, source = 0) {
|
||||||
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());
|
return scrapeProfile(actorRes.body.toString(), actorUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue