fix: /jdlingyu DOM 更新 (#5020)

This commit is contained in:
simoin
2020-06-22 11:39:25 +08:00
committed by GitHub
parent 89fdfc1369
commit ece50722c0
+3 -3
View File
@@ -17,15 +17,15 @@ module.exports = async (ctx) => {
const $ = cheerio.load(response.data);
const items = await Promise.all(
$('#main > div.grid-bor > div')
$('#post-list > ul.b2_gap > li')
.get()
.map(async (div) => {
const a = $(div).find('.entry-title > a');
const a = $(div).find('.post-info > h2 > a');
const link = a.attr('href');
const description = await ctx.cache.tryGet(link, async () => {
const response = await got.get(link);
const $ = cheerio.load(response.data);
return $('#content-innerText > p').html();
return $('.entry-content > p').html();
});
return Promise.resolve({
title: a.text(),