Added channel map to Naughty America.

This commit is contained in:
DebaucheryLibrarian
2026-01-24 01:30:17 +01:00
parent fe0d450af0
commit e7b9147995
2 changed files with 43 additions and 2 deletions

View File

@@ -5,6 +5,16 @@ const unprint = require('unprint');
const slugify = require('../utils/slugify');
const { stripQuery } = require('../utils/url');
const channelMap = {
spa: 'thespa',
gym: 'thegym',
dormroom: 'thedormroom',
dressingroom: 'thedressingroom',
psepornstarexperience: 'pornstarexperience',
office: 'theoffice',
ta: 'tanda',
};
function scrapeLatest(scenes, channel) {
return scenes.map(({ query }) => {
const release = {};
@@ -40,7 +50,9 @@ function scrapeLatest(scenes, channel) {
query.exists('//a[contains(@class, "label-hd") and contains(text(), "HD")]') && 720,
].filter(Boolean);
release.channel = slugify(query.content('.site-title'), '');
const channelSlug = slugify(query.content('.site-title'), '');
release.channel = channelMap[channelSlug] || channelSlug;
// NA affiliate prefers to push more traffic to Naughty America VR, all scenes labeled VR seem to be available on NAVR
release.url = release.tags?.some((tag) => tag.toLowerCase() === 'vr')
@@ -95,6 +107,7 @@ function scrapeScene({ query }, { url }) {
query.img('.play-trailer img[data-srcset*="scenes/"]', { attribute: 'data-srcset' }),
query.img('.scenepage-video .playcard'),
query.img('.scene-page .start-card'),
query.poster('dl8-video[poster]'),
].filter(Boolean);
release.photos = query.els('.contain-scene-images.desktop-only .scene-image').map((imgEl) => [
@@ -114,7 +127,9 @@ function scrapeScene({ query }, { url }) {
];
}
release.channel = slugify(query.content('.site-title'), '');
const channelSlug = slugify(query.content('.site-title'), '');
release.channel = channelMap[channelSlug] || channelSlug;
release.tags = query.contents('.categories a, .category a');