Skip to content

Commit e764739

Browse files
authored
fix(route/duckdb): change blogs link and author (#17856)
* fix(route/duckdb): change blogs link and author * fix(route/duckdb): update description selector ---------
1 parent d93568f commit e764739

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/routes/duckdb/news.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ async function handler() {
3636
item = $(item);
3737
return {
3838
title: item.find('h3').text().trim(),
39-
link: `https://duckdb.org${item.find('a').eq(2).attr('href')}`,
39+
link: `https://duckdb.org${item.find('a.blocklink').attr('href')}`,
4040
pubDate: timezone(parseDate(item.find('.date').text(), 'YYYY-MM-DD'), 0),
41+
author: item.find('.author').text().trim(),
4142
};
4243
});
4344

@@ -46,9 +47,7 @@ async function handler() {
4647
cache.tryGet(item.link, async () => {
4748
const response = await got(item.link);
4849
const $ = load(response.body);
49-
item.author = $('.author').text();
50-
item.description = $('.singleentry').html();
51-
50+
item.description = $('.contentwidth').find('h1, .infoline').remove().end().html();
5251
// 上面每个列表项的每个属性都在此重用,
5352
// 并增加了一个新属性“description”
5453
return item;

0 commit comments

Comments
 (0)