fix(route): freewechat link (#14397)

This commit is contained in:
Tony 2024-02-05 20:26:40 +08:00 committed by GitHub
parent bbeefb0962
commit 23dfb6c6f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

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