Fixed Bang scraper. Added Kink affiliate, tag photos.
This commit is contained in:
@@ -15,7 +15,7 @@ const genderMap = {
|
||||
};
|
||||
|
||||
function getScreenUrl(item, scene) {
|
||||
return `https://i.bang.com/screenshots/${scene.dvd.id}/movie/${scene.order}/${item.screenId}.jpg`;
|
||||
return `https://i.bang.com/screenshots/${scene.dvd.id}/${scene.type}/${scene.order}/${item.screenId}.jpg`;
|
||||
}
|
||||
|
||||
function encodeId(id) {
|
||||
@@ -47,7 +47,7 @@ async function fetchPhotos(scene) {
|
||||
encodeJSON: false,
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
if (res.ok && res.body.images) {
|
||||
return res.body.images.map(image => qu.prefixUrl(image, 'https://photos.bang.com'));
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ async function scrapeScene(scene, entity, options) {
|
||||
}
|
||||
|
||||
function scrapeAll(scenes, entity) {
|
||||
return scenes.map(({ _source: scene }) => scrapeScene(scene, entity));
|
||||
return Promise.all(scenes.map(({ _source: scene }) => scrapeScene(scene, entity)));
|
||||
}
|
||||
|
||||
async function fetchActorReleases(actor, entity) {
|
||||
|
||||
Reference in New Issue
Block a user