mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-08-31 01:01:11 +08:00
fix(route/bullionvault): missing latest articles (#18754)
This commit is contained in:
@@ -20,15 +20,15 @@ export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
||||
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<Element> = $(el);
|
||||
const $aEl: Cheerio<Element> = $el.find('td.views-field-title a').first();
|
||||
const $aEl: Cheerio<Element> = $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) => {
|
||||
|
||||
Reference in New Issue
Block a user