forked from DebaucheryLibrarian/traxxx
Updated default request limit config. Added type expect to Kink images to fix broken photos due malformed content type header.
This commit is contained in:
@@ -32,14 +32,24 @@ function scrapeAll(scenes, entity) {
|
||||
stripQuery(poster).replace('_thumb', '_full'),
|
||||
stripQuery(poster),
|
||||
poster,
|
||||
];
|
||||
].filter(Boolean).map((src) => ({
|
||||
src,
|
||||
expectType: {
|
||||
PNG: 'image/png',
|
||||
},
|
||||
}));
|
||||
|
||||
try {
|
||||
release.photos = JSON.parse(query.attribute('.ratio-thumbnail img', 'data-cycle')).map((src) => [
|
||||
stripQuery(src).replace('_thumb', '_full'),
|
||||
stripQuery(src),
|
||||
src,
|
||||
]);
|
||||
].filter(Boolean).map((source) => ({
|
||||
src: source,
|
||||
expectType: {
|
||||
PNG: 'image/png',
|
||||
},
|
||||
})));
|
||||
} catch (error) {
|
||||
// no photos
|
||||
}
|
||||
@@ -79,12 +89,22 @@ function scrapeScene({ query }, url, entity) {
|
||||
release.poster = [
|
||||
stripQuery(poster),
|
||||
poster,
|
||||
];
|
||||
].filter(Boolean).map((src) => ({
|
||||
src,
|
||||
expectType: {
|
||||
PNG: 'image/png',
|
||||
},
|
||||
}));
|
||||
|
||||
release.photos = query.json('#galleryImagesContainer', { attribute: 'data-images' })?.map((src) => [
|
||||
src.fullPath,
|
||||
src.thumbFullPath,
|
||||
]);
|
||||
].filter(Boolean).map((source) => ({
|
||||
src: source,
|
||||
expectType: {
|
||||
PNG: 'image/png',
|
||||
},
|
||||
})));
|
||||
|
||||
release.trailer = [
|
||||
...(data?.trailer?.sources?.map((source) => ({
|
||||
|
||||
Reference in New Issue
Block a user