From 40276a11f9c9d88f9f467a259973615e1a5aa435 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Tue, 25 Jul 2023 20:45:46 +0200 Subject: [PATCH] Fixed Tokyo Hot deep scrape failing on missing trailer. --- src/scrapers/tokyohot.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/scrapers/tokyohot.js b/src/scrapers/tokyohot.js index b8f1e05d..e281c3a5 100644 --- a/src/scrapers/tokyohot.js +++ b/src/scrapers/tokyohot.js @@ -46,12 +46,14 @@ function scrapeScene({ query }, url, channel) { release.tags = query.contents('.info a[href*="type=play"]'); - const poster = query.poster('.movie video'); + const poster = query.poster('.movie video') || query.img('.movie img'); - release.poster = [ - poster, - poster.replace('820x462', '220x124'), - ]; + if (poster) { + release.poster = [ + poster, + poster.replace('820x462', '220x124'), + ]; + } release.trailer = query.video('.movie source');