fix(route/duckdb): change blogs link and author (#17856)

* fix(route/duckdb): change blogs link and author

* fix(route/duckdb): update description selector

---------
This commit is contained in:
mocusez
2024-12-11 01:46:54 +08:00
committed by GitHub
parent d93568fd12
commit e7647392dc
+3 -4
View File
@@ -36,8 +36,9 @@ async function handler() {
item = $(item);
return {
title: item.find('h3').text().trim(),
link: `https://duckdb.org${item.find('a').eq(2).attr('href')}`,
link: `https://duckdb.org${item.find('a.blocklink').attr('href')}`,
pubDate: timezone(parseDate(item.find('.date').text(), 'YYYY-MM-DD'), 0),
author: item.find('.author').text().trim(),
};
});
@@ -46,9 +47,7 @@ async function handler() {
cache.tryGet(item.link, async () => {
const response = await got(item.link);
const $ = load(response.body);
item.author = $('.author').text();
item.description = $('.singleentry').html();
item.description = $('.contentwidth').find('h1, .infoline').remove().end().html();
// 上面每个列表项的每个属性都在此重用,
// 并增加了一个新属性“description”
return item;