From 3647993b6842f335e76bc67ed9c279d3f55d15f0 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Thu, 4 Sep 2025 13:28:02 +0800 Subject: [PATCH] fix(route): BullionVault Gold News (#19962) --- lib/routes/bullionvault/gold-news.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/bullionvault/gold-news.ts b/lib/routes/bullionvault/gold-news.ts index 71e50c1e0..935573a9f 100644 --- a/lib/routes/bullionvault/gold-news.ts +++ b/lib/routes/bullionvault/gold-news.ts @@ -21,7 +21,7 @@ export const handler = async (ctx: Context): Promise => { let items: DataItem[] = []; - items = $('section#block-views-latest-articles-block div.media, section#block-system-main table.views-table tr') + items = $('section#block-bootstrap-views-block-latest-articles-block div.media, div.gold-news-content table tr') .slice(0, limit) .toArray() .map((el): Element => { @@ -66,8 +66,8 @@ export const handler = async (ctx: Context): Promise => { const detailResponse = await ofetch(item.link); const $$: CheerioAPI = load(detailResponse); - const title: string = $$('header h1').text(); - const description: string | undefined = $$('div[property="content:encoded"]').html() ?? ''; + const title: string = $$('article.article h1').text(); + const description: string | undefined = $$('div.content').html() ?? ''; const pubDateStr: string | undefined = $$('div.submitted').text().split(/,/).pop(); const categories: string[] = $$('meta[name="news_keywords"]').attr('content')?.split(/,/) ?? []; const authorEls: Element[] = $$('div.view-author-bio').toArray();