Added upcoming to Porn World scraper.
This commit is contained in:
parent
a740c8b046
commit
ac51382d8b
|
@ -11,7 +11,7 @@ function scrapeAll(scenes) {
|
||||||
|
|
||||||
release.title = query.content('.card-title a');
|
release.title = query.content('.card-title a');
|
||||||
|
|
||||||
release.date = query.date('.release-date', 'YYYY MMMM, DD', { match: /\d{4} \w+, \d{1,2}/i });
|
release.date = query.date('.release-date, .coming-soon-date', 'YYYY MMMM, DD', { match: /\d{4} \w+, \d{1,2}/i });
|
||||||
release.duration = query.duration('.video-duration');
|
release.duration = query.duration('.video-duration');
|
||||||
|
|
||||||
release.actors = query.all('.starring a').map((actorEl) => ({
|
release.actors = query.all('.starring a').map((actorEl) => ({
|
||||||
|
@ -82,6 +82,17 @@ async function fetchLatest(channel, page = 1) {
|
||||||
return res.status;
|
return res.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function fetchUpcoming(channel) {
|
||||||
|
const url = `${channel.url}/coming-soon`;
|
||||||
|
const res = await unprint.get(url, { selectAll: '.card.scene' });
|
||||||
|
|
||||||
|
if (res.ok) {
|
||||||
|
return scrapeAll(res.context, channel);
|
||||||
|
}
|
||||||
|
|
||||||
|
return res.status;
|
||||||
|
}
|
||||||
|
|
||||||
async function fetchProfile({ name: actorName }, entity) {
|
async function fetchProfile({ name: actorName }, entity) {
|
||||||
const searchUrl = `${entity.url}/models?name=${actorName}&sort=popularity`;
|
const searchUrl = `${entity.url}/models?name=${actorName}&sort=popularity`;
|
||||||
const searchRes = await unprint.get(searchUrl);
|
const searchRes = await unprint.get(searchUrl);
|
||||||
|
@ -108,6 +119,7 @@ async function fetchProfile({ name: actorName }, entity) {
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
fetchLatest,
|
fetchLatest,
|
||||||
|
fetchUpcoming,
|
||||||
fetchProfile,
|
fetchProfile,
|
||||||
scrapeScene,
|
scrapeScene,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue