Refactored Love Her Films, using API. Fixed Naughty America scraper for Tonight's Girlfriend.

This commit is contained in:
DebaucheryLibrarian
2026-01-21 23:00:28 +01:00
parent c0459201b6
commit b0b8295629
7 changed files with 184 additions and 100 deletions

View File

@@ -52,7 +52,7 @@ async function fetchLatest(channel, page = 1) {
const res = await unprint.browserRequest(url, {
selectAll: '.site-list .scene-item, .panel-body',
async control(ctx) {
await ctx.locator('.site-list').hover({ trial: true, timeout: 10000 }); // wait for overview to initialize
await ctx.locator('.site-list, .grid-three').hover({ trial: true, timeout: 10000 }); // wait for overview to initialize
},
});
@@ -82,7 +82,7 @@ function scrapeScene({ query }, { url }) {
name: unprint.query.content(actorEl),
url: stripQuery(unprint.query.url(actorEl, null)),
}))
: query.content('.grey-performers')?.split(',').map((actorName) => actorName.trim());
: query.content('.grey-performers')?.split(',').map((actorName) => actorName.trim()); // not all performers are linked
release.poster = [
...(query.sourceSet('.play-trailer source[data-srcset*="scenes/"][type="image/jpeg"]', 'data-srcset') || []),
@@ -119,13 +119,15 @@ function scrapeScene({ query }, { url }) {
query.exists('//a[contains(@class, "label-hd") and contains(text(), "HD")]') && 720,
].filter(Boolean);
console.log(release);
return release;
}
async function fetchScene(url, _channel) {
const res = await unprint.browserRequest(url, {
async control(ctx) {
await ctx.locator('.scene-info').hover({ trial: true, timeout: 30000 }); // wait for trailer to initialize
await ctx.locator('.scene-info, .scene').hover({ trial: true, timeout: 30000 }); // wait for trailer to initialize
},
});