From b9a71029f3d873b8b0a91c36c9c834e2b45e449b Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 2 Apr 2025 00:49:19 +0800 Subject: [PATCH] fix(route/bullionvault): missing latest articles (#18754) --- 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 c71686a4b..ecef8a97a 100644 --- a/lib/routes/bullionvault/gold-news.ts +++ b/lib/routes/bullionvault/gold-news.ts @@ -20,15 +20,15 @@ export const handler = async (ctx: Context): Promise => { let items: DataItem[] = []; - items = $('div.gold-news-content div.view-content table.views-table tbody tr') + items = $('section#block-views-latest-articles-block div.media, section#block-system-main table.views-table tr') .slice(0, limit) .toArray() .map((el): Element => { const $el: Cheerio = $(el); - const $aEl: Cheerio = $el.find('td.views-field-title a').first(); + const $aEl: Cheerio = $el.find('td.views-field-title a, div.views-field-title a').first(); const title: string = $aEl.text(); - const pubDateStr: string | undefined = $el.find('td.views-field-created').text().trim(); + const pubDateStr: string | undefined = $el.find('td.views-field-created, div.views-field-created').text().trim(); const linkUrl: string | undefined = $aEl.attr('href'); const authorEls: Element[] = $el.find('a.username').toArray(); const authors: DataItem['author'] = authorEls.map((authorEl) => {