2019-04-06 21:24:26 +00:00
|
|
|
'use strict';
|
|
|
|
|
2020-03-07 01:35:13 +00:00
|
|
|
const { fetchScene, fetchLatest, fetchUpcoming, fetchProfile } = require('./gamma');
|
2019-04-06 21:24:26 +00:00
|
|
|
|
2020-03-07 01:35:13 +00:00
|
|
|
async function fetchSceneWrapper(url, site, baseRelease) {
|
2020-05-14 02:26:05 +00:00
|
|
|
const release = await fetchScene(url, site, baseRelease);
|
2019-12-13 04:04:04 +00:00
|
|
|
|
2020-05-14 02:26:05 +00:00
|
|
|
if (site.isNetwork && release.channel) {
|
|
|
|
const channelUrl = url.replace('blowpass.com', `${release.channel}.com`);
|
2019-09-26 01:27:01 +00:00
|
|
|
|
2020-05-14 02:26:05 +00:00
|
|
|
if (['onlyteenblowjobs', 'mommyblowsbest'].includes(release.channel)) {
|
|
|
|
release.url = channelUrl.replace(/video\/\w+\//, 'scene/');
|
|
|
|
return release;
|
|
|
|
}
|
2020-03-07 01:35:13 +00:00
|
|
|
|
2020-05-14 02:26:05 +00:00
|
|
|
release.url = channelUrl.replace(/video\/\w+\//, 'video/');
|
|
|
|
}
|
2019-04-06 21:24:26 +00:00
|
|
|
|
2020-05-14 02:26:05 +00:00
|
|
|
return release;
|
2019-04-06 21:24:26 +00:00
|
|
|
}
|
|
|
|
|
2020-02-07 00:48:21 +00:00
|
|
|
function getActorReleasesUrl(actorPath, page = 1) {
|
2020-05-14 02:26:05 +00:00
|
|
|
return `https://www.blowpass.com/en/videos/blowpass/latest/All-Categories/0${actorPath}/${page}`;
|
2020-02-07 00:48:21 +00:00
|
|
|
}
|
|
|
|
|
2020-07-20 23:44:51 +00:00
|
|
|
async function networkFetchProfile({ name: actorName }, context, include) {
|
|
|
|
return fetchProfile({ name: actorName }, context, null, getActorReleasesUrl, include);
|
2020-02-07 00:48:21 +00:00
|
|
|
}
|
|
|
|
|
2019-04-06 21:24:26 +00:00
|
|
|
module.exports = {
|
2020-05-14 02:26:05 +00:00
|
|
|
fetchLatest,
|
|
|
|
fetchProfile: networkFetchProfile,
|
|
|
|
fetchUpcoming,
|
|
|
|
fetchScene: fetchSceneWrapper,
|
2019-04-06 21:24:26 +00:00
|
|
|
};
|