fix(route): javdb new layout (#9687)

This commit is contained in:
Tony 2022-05-04 06:02:47 +11:00 committed by GitHub
parent e0a809fbc2
commit 225d922d9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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()),
};
});