Ignore join links for trailers in Dogfart scraper.

This commit is contained in:
DebaucheryLibrarian 2022-04-03 01:29:16 +02:00
parent 505ff0767c
commit 762b3984a3
1 changed files with 6 additions and 2 deletions

View File

@ -75,10 +75,14 @@ async function scrapeScene({ query }, url, channel, baseScene, parameters) {
release.tags = query.cnts('.scene-details .categories a');
release.trailer = query.video('.html5-video', 'data-trailer');
const trailer = query.video('.html5-video', 'data-trailer');
const lastPhotosUrl = query.urls('.pagination a').at(-1);
release.poster = query.poster('.html5-video', 'data-poster');
const lastPhotosUrl = query.urls('.pagination a').at(-1);
if (trailer && !trailer?.includes('join')) {
release.trailer = trailer;
}
if (lastPhotosUrl && parameters.includePhotos) {
release.photos = await getPhotos(`${origin}${pathname}${lastPhotosUrl}`, channel, url);