From 225d922d9cc9b52035509aace0f12ca3767f74df Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 4 May 2022 06:02:47 +1100 Subject: [PATCH] fix(route): javdb new layout (#9687) --- lib/v2/javdb/utils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/v2/javdb/utils.js b/lib/v2/javdb/utils.js index bdec2133f..d849d7932 100644 --- a/lib/v2/javdb/utils.js +++ b/lib/v2/javdb/utils.js @@ -14,16 +14,16 @@ module.exports = { const $ = cheerio.load(response.data); - $('.tags, .tag-can-play').remove(); + $('.tags, .tag-can-play, .over18-modal').remove(); - let items = $('.grid-item a') + let items = $('div.item') .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 20) .toArray() .map((item) => { item = $(item); return { - title: item.text(), - link: `${rootUrl}${item.attr('href')}`, + title: item.find('.video-title').text(), + link: `${rootUrl}${item.find('.box').attr('href')}`, pubDate: parseDate(item.find('.meta').text()), }; });