Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 1032c3cb57 1.231.18 2023-08-04 22:30:20 +02:00
DebaucheryLibrarian 5f26f8de27 Excluding studios from entity aggregration. Added profile scraping to Teste de Fudelidade. 2023-08-04 22:30:18 +02:00
4 changed files with 11 additions and 8 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.231.17", "version": "1.231.18",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "traxxx", "name": "traxxx",
"version": "1.231.17", "version": "1.231.18",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@casl/ability": "^5.2.2", "@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.231.17", "version": "1.231.18",
"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": {

View File

@ -206,8 +206,9 @@ async function fetchEntitiesBySlug(entitySlugs, prefer = 'channel') {
parent_id, parent_id,
array['parent'] as parent_path array['parent'] as parent_path
FROM entities FROM entities
WHERE slug = ANY(:entitySlugs) WHERE (slug = ANY(:entitySlugs)
OR url ILIKE ANY(:entityHosts) OR url ILIKE ANY(:entityHosts))
AND type IN ('channel', 'network')
UNION ALL UNION ALL

View File

@ -71,7 +71,6 @@ function scrapeProfile({ query }, url) {
profile.avatar = query.img('.model .photo img'); profile.avatar = query.img('.model .photo img');
profile.scenes = scrapeAll(unprint.initAll(query.all('.single .itemsingle'))); profile.scenes = scrapeAll(unprint.initAll(query.all('.single .itemsingle')));
console.log(profile);
return profile; return profile;
} }
@ -89,8 +88,11 @@ async function fetchLatest(channel, page) {
} }
async function fetchProfile(actor, { entity }) { async function fetchProfile(actor, { entity }) {
const url = actor.url || `${entity.url}/models/${actor.slug}/`; const url = actor.url || `${entity.url}/modelos/${actor.slug}/`;
const res = await unprint.get(url);
const res = await unprint.get(url, {
maxRedirects: 0, // will attempt to redirect invalid URL to relevant scene page
});
if (res.ok) { if (res.ok) {
return scrapeProfile(res.context, url); return scrapeProfile(res.context, url);