Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian b383482103 1.244.97 2025-12-30 05:14:37 +01:00
DebaucheryLibrarian 37b5e8c573 Fixed Hookup Hotshot scraper breaking if scene page has no trailer video. 2025-12-30 05:14:34 +01:00
3 changed files with 27 additions and 25 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "traxxx",
"version": "1.244.96",
"version": "1.244.97",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "traxxx",
"version": "1.244.96",
"version": "1.244.97",
"license": "ISC",
"dependencies": {
"@aws-sdk/client-s3": "^3.458.0",

View File

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

View File

@ -29,6 +29,17 @@ function scrapeAll(scenes, _channel) {
});
}
async function fetchLatest(channel, page = 1) {
const url = `${channel.url}/categories/movies/${page}/latest/`;
const res = await unprint.get(url, { selectAll: '.items .item-video' });
if (res.ok) {
return scrapeAll(res.context, channel);
}
return res.status;
}
function scrapeScene({ query, html }, { url, entity, baseRelease }) {
const release = {};
@ -50,19 +61,21 @@ function scrapeScene({ query, html }, { url, entity, baseRelease }) {
release.trailer = unprint.prefixUrl(html.match(/src="(\/trailers\/.*\.mp4)"/)?.[1], entity.url);
const posterUrl = unprint.prefixUrl(html.match(/poster="(\/content\/.*\.jpg)"/)?.[1], entity.url);
const posterUrl = query.img('img.update_thumb', { attribute: 'src0_1x' }) || unprint.prefixUrl(html.match(/poster="(\/content\/.*\.jpg)"/)?.[1], entity.url);
const posterFallbacks = [
posterUrl.replace('-1x', '-2x'),
posterUrl.replace('-1x', '-3x'),
posterUrl,
];
if (posterUrl) {
const posterFallbacks = [
posterUrl.replace('-1x', '-2x'),
posterUrl.replace('-1x', '-3x'),
posterUrl,
];
// scene page poster does not appear on update page
if (baseRelease?.poster) {
release.photos = [posterFallbacks, ...(baseRelease.photos || [])];
} else {
release.poster = posterFallbacks;
// scene page poster does not appear on update page
if (baseRelease?.poster) {
release.photos = [posterFallbacks, ...(baseRelease.photos || [])];
} else {
release.poster = posterFallbacks;
}
}
return release;
@ -83,17 +96,6 @@ function scrapeProfile({ query }) {
return profile;
}
async function fetchLatest(channel, page = 1) {
const url = `${channel.url}/categories/movies/${page}/latest/`;
const res = await unprint.get(url, { selectAll: '.items .item-video' });
if (res.ok) {
return scrapeAll(res.context, channel);
}
return res.status;
}
async function fetchProfile(actor, entity) {
const url = actor.url || `${entity.url}/models/${actor.slug}.html`;
const res = await unprint.get(url);