From 03f9a18146cd147db3a26eedb3843e076cc97772 Mon Sep 17 00:00:00 2001 From: Fatpandac Date: Sat, 8 Apr 2023 20:28:08 +0800 Subject: [PATCH] fix(route): show all content of tittle on description (#12259) * fix(route): show all content of tittle on description * fix(route): pubDate is invalid --- lib/v2/wanqu/news.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/v2/wanqu/news.js b/lib/v2/wanqu/news.js index 5052b39c5..a888970a3 100644 --- a/lib/v2/wanqu/news.js +++ b/lib/v2/wanqu/news.js @@ -13,9 +13,10 @@ module.exports = async (ctx) => { const items = $('div.mb-4') .toArray() .map((item) => ({ - title: $(item).text(), + title: $(item).find('a').text(), + description: $(item).find('a').text(), link: $(item).find('a').attr('href'), - pubDate: parseDate($(item).find('i.text-helper-color.mr-4').text()), + pubDate: parseDate($(item).find('i.text-helper-color.mr-4').text().trim()), })); ctx.state.data = {