diff --git a/lib/routes/duckdb/news.ts b/lib/routes/duckdb/news.ts index d4cde64a9ffd6b..eece112c560854 100644 --- a/lib/routes/duckdb/news.ts +++ b/lib/routes/duckdb/news.ts @@ -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;