From 23dfb6c6f25765703ff476ac7355e991d7c876e2 Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 5 Feb 2024 20:26:40 +0800 Subject: [PATCH] fix(route): freewechat link (#14397) --- lib/v2/freewechat/profile.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/v2/freewechat/profile.js b/lib/v2/freewechat/profile.js index 49a1b5533..66d4fce0e 100644 --- a/lib/v2/freewechat/profile.js +++ b/lib/v2/freewechat/profile.js @@ -17,11 +17,13 @@ module.exports = async (ctx) => { .slice(0, -1) // last item is a template .map((item) => { item = $(item); + const a = item.find('h3 a'); return { - title: item.find('a').text(), + title: a.text().trim(), author, - link: `${baseUrl}${item.find('a').attr('href')}`, + link: `${baseUrl}${a.attr('href')}`, description: item.find('.preview').text(), + category: item.find('.classification').text().trim(), }; });