27 lines
799 B
JavaScript
27 lines
799 B
JavaScript
'use strict';
|
|
|
|
const { fetchLatest, fetchUpcoming, scrapeScene, fetchProfile } = require('./gamma');
|
|
const http = require('../utils/http');
|
|
|
|
async function fetchScene(url, site, baseRelease, options) {
|
|
const res = await http.get(url);
|
|
|
|
const release = await scrapeScene(res.body.toString(), url, site, baseRelease, null, options);
|
|
|
|
const siteDomain = release.$('meta[name="twitter:domain"]').attr('content') || 'allblackx.com'; // only AllBlackX has no twitter domain, no other useful hints available
|
|
const siteSlug = siteDomain && siteDomain.split('.')[0].toLowerCase();
|
|
// const siteUrl = siteDomain && `https://www.${siteDomain}`;
|
|
|
|
release.channel = siteSlug;
|
|
release.director = 'Mason';
|
|
|
|
return release;
|
|
}
|
|
|
|
module.exports = {
|
|
fetchLatest,
|
|
fetchProfile,
|
|
fetchUpcoming,
|
|
fetchScene,
|
|
};
|