Updating Manticore in movie scene association. Fixed Jules Jordan scene movie link.
This commit is contained in:
+22
-17
@@ -256,13 +256,15 @@ async function scrapeScene({ html, query }, context) {
|
||||
})));
|
||||
}
|
||||
|
||||
if (query.exists('.player-scene-description a[href*="/dvd"]')) {
|
||||
const movieQuery = '//div[@class="meta-item"][div[@class="lbl" and text()="Movie"]]/div[@class="val"]/a';
|
||||
|
||||
if (query.exists(movieQuery)) {
|
||||
release.movie = {
|
||||
url: query.url('.player-scene-description a[href*="/dvd"]'),
|
||||
title: query.content('.player-scene-description a[href*="/dvd"]'),
|
||||
url: query.url(movieQuery),
|
||||
title: query.content(movieQuery),
|
||||
};
|
||||
|
||||
release.movie.entryId = new URL(release.movie.url).pathname.split('/').slice(-1)[0]?.replace('.html', '').toLowerCase();
|
||||
release.movie.entryId = new URL(release.movie.url).pathname.match(/\/dvds\/(.*?).html/)?.[1];
|
||||
}
|
||||
|
||||
release.stars = query.number('.avg_rating');
|
||||
@@ -275,32 +277,35 @@ async function scrapeScene({ html, query }, context) {
|
||||
function scrapeMovie({ query }, { url }) {
|
||||
const movie = {};
|
||||
|
||||
movie.entryId = new URL(url).pathname.split('/').slice(-1)[0]?.replace('.html', '').toLowerCase();
|
||||
movie.title = query.attribute('meta[property="og:title"]', 'content');
|
||||
movie.entryId = new URL(url).pathname.match(/\/dvds\/(.*?).html/)?.[1];
|
||||
movie.title = query.attribute('meta[property="og:title"]', 'content')?.replace(/\s*-\s*jules jordan/i, '');
|
||||
|
||||
movie.covers = [query.img('img.dvd_box')]; // -2x etc is likely upscaled
|
||||
|
||||
const sceneTitles = query.contents('.title-heading-content-black-dvd');
|
||||
const descriptionDate = query.content('meta[name="description"]', { attribute: 'content' })?.match(/released (\w+ \d{4})/i)?.[1];
|
||||
|
||||
const scenes = query.all('.grid-container-scene').map((sceneEl, index) => {
|
||||
if (descriptionDate) {
|
||||
movie.date = unprint.extractDate(descriptionDate, 'MMMM YYYY', { match: null });
|
||||
movie.datePrecision = 'month';
|
||||
}
|
||||
|
||||
const scenes = query.all('.dvd-scene').map((sceneEl) => {
|
||||
const scene = {};
|
||||
|
||||
scene.url = unprint.query.url(sceneEl, 'a[href*="/scenes"]');
|
||||
scene.title = sceneTitles[index];
|
||||
|
||||
scene.date = unprint.query.date(sceneEl, '//span[contains(@class, "dvd-scene-description") and span[contains(text(), "Date")]]', 'MM/DD/YYYY');
|
||||
scene.actors = unprint.query.contents(sceneEl, '.update_models a');
|
||||
|
||||
scene.url = unprint.query.url(sceneEl, '.dvd-watch-btn');
|
||||
scene.entryId = getEntryId(scene.url);
|
||||
|
||||
scene.title = unprint.query.content(sceneEl, '.dvd-hero-title');
|
||||
scene.date = unprint.query.date(sceneEl, '.dvd-hero-date', 'MM/DD/YYYY');
|
||||
scene.actors = unprint.query.contents(sceneEl, '.dvd-hero .update_models a');
|
||||
|
||||
scene.photos = unprint.query.imgs(sceneEl, '.dvd-img-strip img');
|
||||
|
||||
return scene;
|
||||
});
|
||||
|
||||
movie.scenes = scenes?.sort((sceneA, sceneB) => sceneA.date - sceneB.date);
|
||||
|
||||
movie.date = movie.scenes?.[0]?.date;
|
||||
movie.datePrecision = 'month';
|
||||
|
||||
return movie;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user