Added Anal Only and upcoming scraping to Mike Adriano. Fixed profile expand arrow color.
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user