forked from DebaucheryLibrarian/traxxx
Adapted Aylo scraper for Bang Bros.
This commit is contained in:
@@ -72,9 +72,9 @@ function getVideos(data) {
|
||||
return { teaser, trailer };
|
||||
}
|
||||
|
||||
function scrapeLatestX(data, site, filterChannel) {
|
||||
function scrapeLatestX(data, site, filterChannel, options) {
|
||||
const release = {
|
||||
entryId: data.id,
|
||||
entryId: (options?.parameters.preferSpartanId && data.spartanId) || data.id,
|
||||
title: data.title,
|
||||
description: data.description,
|
||||
};
|
||||
@@ -116,8 +116,8 @@ function scrapeLatestX(data, site, filterChannel) {
|
||||
return release;
|
||||
}
|
||||
|
||||
async function scrapeLatest(items, site, filterChannel) {
|
||||
const latestReleases = items.map((data) => scrapeLatestX(data, site, filterChannel));
|
||||
async function scrapeLatest(items, site, filterChannel, options) {
|
||||
const latestReleases = items.map((data) => scrapeLatestX(data, site, filterChannel, options));
|
||||
|
||||
return {
|
||||
scenes: latestReleases.filter((scene) => !scene.exclude),
|
||||
@@ -125,12 +125,12 @@ async function scrapeLatest(items, site, filterChannel) {
|
||||
};
|
||||
}
|
||||
|
||||
function scrapeRelease(data, url, channel, networkName) {
|
||||
function scrapeRelease(data, url, channel, networkName, options) {
|
||||
const release = {};
|
||||
|
||||
const { id: entryId, title, description } = data;
|
||||
|
||||
release.entryId = data.id;
|
||||
release.entryId = (options?.parameters.preferSpartanId && data.spartanId) || data.id;
|
||||
release.title = title;
|
||||
release.description = description;
|
||||
|
||||
@@ -321,7 +321,7 @@ async function fetchLatest(site, page = 1, options) {
|
||||
});
|
||||
|
||||
if (res.status === 200 && res.body.result) {
|
||||
return scrapeLatest(res.body.result, site);
|
||||
return scrapeLatest(res.body.result, site, false, options);
|
||||
}
|
||||
|
||||
return res.statusCode;
|
||||
@@ -346,7 +346,7 @@ async function fetchUpcoming(site, page, options) {
|
||||
});
|
||||
|
||||
if (res.statusCode === 200 && res.body.result) {
|
||||
return scrapeLatest(res.body.result, site, true);
|
||||
return scrapeLatest(res.body.result, site, true, options);
|
||||
}
|
||||
|
||||
return res.statusCode;
|
||||
@@ -373,7 +373,7 @@ async function fetchRelease(url, site, baseScene, options) {
|
||||
|
||||
if (res.status === 200 && res.body.result) {
|
||||
return {
|
||||
scene: scrapeRelease(res.body.result, url, site),
|
||||
scene: scrapeRelease(res.body.result, url, site, null, options),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ const scrapers = {
|
||||
badoink,
|
||||
bamvisions,
|
||||
bang,
|
||||
bangbros,
|
||||
bangbros: aylo,
|
||||
bluedonkeymedia,
|
||||
bradmontana,
|
||||
brazzers: aylo,
|
||||
|
||||
Reference in New Issue
Block a user