Adapted Perv City scraper for Maestro Claudio template.
This commit is contained in:
@@ -9657,6 +9657,15 @@ const sites = [
|
||||
native: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
slug: 'maestroclaudio',
|
||||
name: 'Maestro Claudio',
|
||||
url: 'https://maestroclaudio.com',
|
||||
parent: 'pervcity',
|
||||
parameters: {
|
||||
native: true,
|
||||
},
|
||||
},
|
||||
// PIERRE WOODMAN
|
||||
{
|
||||
slug: 'woodmancastingx',
|
||||
|
||||
@@ -88,35 +88,44 @@ async function fetchUpcoming(channel) {
|
||||
function scrapeScene({ query }, channel) {
|
||||
const release = {};
|
||||
|
||||
release.entryId = query.attribute('.trailerLeft img', 'id').match(/set-target-(\d+)/)[1];
|
||||
release.entryId = query.attribute('.trailerLeft img, .scene-player img', 'id').match(/set-target-(\d+)/)[1];
|
||||
|
||||
release.title = query.content('.infoHeader h1');
|
||||
release.description = query.content('.description');
|
||||
release.duration = query.duration('.tRuntime');
|
||||
release.title = query.content('.infoHeader h1, .scene-title');
|
||||
release.description = query.content('.description, .scene-desc');
|
||||
|
||||
release.actors = query.all('.infoBox .tour_update_models a').map((actorEl) => ({
|
||||
release.date = query.date('.scene-meta', 'MMMM-DD-YYYY');
|
||||
release.duration = query.duration('.tRuntime, .scene-meta');
|
||||
|
||||
release.actors = query.all('.tour_update_models a').map((actorEl) => ({
|
||||
name: unprint.query.content(actorEl),
|
||||
url: unprint.query.url(actorEl, null),
|
||||
}));
|
||||
|
||||
release.tags = query.contents('.tagcats a');
|
||||
release.qualities = query.imgs('.avaiFormate img').map((src) => qualities[src.match(/\/(\w+)\.png/)[1]]).filter(Boolean);
|
||||
|
||||
if (query.exists('.mc-formats')) {
|
||||
release.qualities = query.contents('.mc-formats .mc-chip').map((format) => Number(format?.match(/(\d{3,})p/)?.[1])).filter(Boolean);
|
||||
} else {
|
||||
release.qualities = query.imgs('.avaiFormate img').map((src) => qualities[src.match(/\/(\w+)\.png/)[1]]).filter(Boolean);
|
||||
}
|
||||
|
||||
release.poster = query.img('.posterimg');
|
||||
release.photos = query.imgs('.trailerSnaps img').slice(1); // first photo is poster in lower quality
|
||||
release.photos = query.imgs('.trailerSnaps img, .mc-stills__strip img').slice(1); // first photo is poster in lower quality
|
||||
|
||||
const trailer = query.element('script')?.textContent.match(/\/trailers\/.+\.mp4/)?.[0];
|
||||
const trailer = query.element('script')?.textContent.match(/\/trailers\\?\/.+\.mp4/)?.[0];
|
||||
|
||||
if (trailer) {
|
||||
release.trailer = `${channel.url}${trailer}`;
|
||||
release.channel = channelCodes[release.trailer.match(channelRegExp)?.[0]];
|
||||
}
|
||||
|
||||
release.photoCount = query.number('.mc-meta', { match: /(\d+) photos/, matchIndex: 1 });
|
||||
|
||||
return release;
|
||||
}
|
||||
|
||||
async function fetchScene(url, entity) {
|
||||
const res = await unprint.get(url, { select: '.trailerArea' });
|
||||
const res = await unprint.get(url, { select: '.trailerArea, .mc-trailer' });
|
||||
|
||||
if (res.ok) {
|
||||
return scrapeScene(res.context, entity);
|
||||
|
||||
Reference in New Issue
Block a user