Added octet expectation to Bang photos.

This commit is contained in:
DebaucheryLibrarian
2026-03-27 03:11:00 +01:00
parent b5e969b7b0
commit ae3a181503

View File

@@ -76,7 +76,12 @@ function scrapeAll(scenes, entity) {
release.poster = [
`${posterUrl.origin}${posterUrl.pathname}`,
posterUrl.href,
];
].map((src) => ({
src,
expect: {
'application/octet-stream': 'image/jpeg',
},
}));
}
const videoData = query.json('a', { attribute: 'data-videopreview-sources-value' });
@@ -147,7 +152,17 @@ async function scrapeScene({ query }, { url, entity }) {
const sourcesData = query.json('.video-container [data-videopreview-sources-value]', { attribute: 'data-videopreview-sources-value' });
release.poster = data?.thumbnailUrl || query.attribute('meta[property="og:image"]', 'content');
const poster = data?.thumbnailUrl || query.attribute('meta[property="og:image"]', 'content');
if (poster) {
release.poster = {
src: poster,
expect: {
'application/octet-stream': 'image/jpeg',
},
};
}
release.teaser = (sourcesData && [
sourcesData.mp4_large,
sourcesData.webm_large,
@@ -158,7 +173,13 @@ async function scrapeScene({ query }, { url, entity }) {
|| query.attribute('meta[property="og:video"]')
|| query.video('video[data-videocontainer-target] source');
release.photos = query.sourceSets('div[data-controller] a[href^="/photos"] img');
release.photos = query.sourceSets('div[data-controller] a[href^="/photos"] img').map((src) => ({
src,
expect: {
'application/octet-stream': 'image/jpeg',
},
}));
release.photoCount = query.number('//h2[contains(text(), "Photos")]/following-sibling::span');
const channelName = query.content('.video-container + div a[href*="?in="]')?.trim();