Added missing Bang sites, updated channel URLs.
This commit is contained in:
@@ -89,6 +89,28 @@ function scrapeAll(scenes, entity) {
|
||||
});
|
||||
}
|
||||
|
||||
async function fetchLatest(channel, page = 1) {
|
||||
const url = `${channel.url}?by=date.desc&page=${page}`;
|
||||
const res = await unprint.get(url, { selectAll: '.video_container' });
|
||||
|
||||
if (res.ok) {
|
||||
return scrapeAll(res.context, channel);
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
async function fetchUpcoming(channel) {
|
||||
const url = `${channel.url}&by=date.desc&early-access=true`;
|
||||
const res = await unprint.get(url, { selectAll: '.video_container' });
|
||||
|
||||
if (res.ok) {
|
||||
return scrapeAll(res.context, channel);
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
async function scrapeScene({ query }, { url, entity }) {
|
||||
const release = {};
|
||||
const data = query.json('//script[contains(text(), "VideoObject")]');
|
||||
@@ -177,28 +199,6 @@ async function scrapeProfile({ query, element }, url, entity, include) {
|
||||
return profile;
|
||||
}
|
||||
|
||||
async function fetchLatest(channel, page = 1) {
|
||||
const url = `${channel.url}&by=date.desc&page=${page}`;
|
||||
const res = await unprint.get(url, { selectAll: '.video_container' });
|
||||
|
||||
if (res.ok) {
|
||||
return scrapeAll(res.context, channel);
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
async function fetchUpcoming(channel) {
|
||||
const url = `${channel.url}&by=date.desc&early-access=true`;
|
||||
const res = await unprint.get(url, { selectAll: '.video_container' });
|
||||
|
||||
if (res.ok) {
|
||||
return scrapeAll(res.context, channel);
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
async function fetchProfile({ name: actorName }, { entity }, include) {
|
||||
const searchRes = await unprint.get(`https://www.bang.com/pornstars?term=${slugify(actorName, '+')}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user