Fixed Arch Angel placeholder thumbnail.
This commit is contained in:
@@ -5,6 +5,8 @@ const unprint = require('unprint');
|
||||
const slugify = require('../utils/slugify');
|
||||
const { feetInchesToCm } = require('../utils/convert');
|
||||
|
||||
const placeholder = /images\/p\d+\.jpe?g/i;
|
||||
|
||||
function getEntryId(release) {
|
||||
return slugify(new URL(release.url).pathname.match(/\/([\w-]+)\.html/)?.[1]
|
||||
|| [unprint.formatDate(release.date, 'YYYY-MM-DD'), release.title, ...release.actors]);
|
||||
@@ -28,7 +30,7 @@ function scrapeAll(scenes) {
|
||||
|
||||
const poster = query.img('img.mainThumb');
|
||||
|
||||
if (poster && !/images\/p\d+\.jpe?g/i.test(poster)) {
|
||||
if (poster && !placeholder.test(poster)) {
|
||||
release.poster = poster;
|
||||
}
|
||||
|
||||
@@ -54,7 +56,12 @@ function scrapeScene({ query, html }, { url }) {
|
||||
url: unprint.query.url(actorEl, null),
|
||||
}));
|
||||
|
||||
release.poster = query.img('.update_thumb') || html.match(/poster="(.*\.jpg)"/)?.[1];
|
||||
const poster = query.img('.update_thumb') || html.match(/poster="(.*\.jpg)"/)?.[1];
|
||||
|
||||
if (poster && !placeholder.test(poster)) {
|
||||
release.poster = poster;
|
||||
}
|
||||
|
||||
release.trailer = html.match(/src="(.*\.mp4)"/)?.[1];
|
||||
|
||||
release.photoCount = query.number('.info', { match: /(\d+) photos/i, matchIndex: 1 });
|
||||
@@ -115,7 +122,7 @@ function scrapeProfile({ query, element }, { url, entity }) {
|
||||
query.img('.model_bio_thumb', { attribute: 'src0_2x', origin: entity.url }),
|
||||
query.img('.model_bio_thumb', { attribute: 'src0_1x', origin: entity.url }),
|
||||
query.img('.model_bio_thumb', { attribute: 'src0', origin: entity.url }),
|
||||
].filter(Boolean);
|
||||
].filter((avatar) => avatar && !placeholder.test(avatar));
|
||||
|
||||
profile.scenes = scrapeAll(unprint.initAll(element, '.item-video'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user