Added Anal Only and upcoming scraping to Mike Adriano. Fixed profile expand arrow color.

This commit is contained in:
DebaucheryLibrarian
2021-01-30 17:43:33 +01:00
parent bfb5006e95
commit 97c088cfb4
36 changed files with 40 additions and 39 deletions

View File

@@ -67,6 +67,29 @@ async function fetchLatest(channel, page = 1) {
return res.status;
}
async function fetchUpcoming(channel) {
const { host } = new URL(channel.url);
const url = `https://tour.${host}`;
const res = await qu.get(url);
if (res.ok) {
if (res.item.query.exists('a[href*="stackpath.com"]')) {
throw new Error('URL blocked by StackPath');
}
const sceneItem = qu.init(res.item.el, '#upcoming-content');
if (sceneItem) {
return scrapeAll([sceneItem], channel);
}
return null;
}
return res.status;
}
async function fetchScene(url, channel) {
const cookieJar = http.cookieJar();
const session = http.session({ cookieJar });
@@ -122,6 +145,7 @@ async function fetchProfile({ name: actorName }, context , site) {
module.exports = {
fetchLatest,
fetchUpcoming,
// fetchProfile,
fetchScene,
};