Skip to content

Commit

Permalink
fix(route): finviz (DIYgod#15867)
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyRL authored Jun 10, 2024
1 parent abae13a commit bb3d1b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/routes/finviz/news.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export const route: Route = {
maintainers: ['nczitzk'],
handler,
url: 'finviz.com/news.ashx',
description: `| News | Blog |
description: `| News | Blogs |
| ---- | ---- |
| news | blog |`,
| news | blogs |`,
};

async function handler(ctx) {
Expand All @@ -54,7 +54,7 @@ async function handler(ctx) {

const items = $('table.table-fixed')
.eq(categories[category.toLowerCase()])
.find('tr.nn')
.find('tr')
.slice(0, limit)
.toArray()
.map((item) => {
Expand All @@ -77,7 +77,7 @@ async function handler(ctx) {
link: a.prop('href'),
description: descriptionMatches ? descriptionMatches[1] : undefined,
author: authorMatches ? authorMatches[1].replaceAll('-', ' ') : 'finviz',
pubDate: timezone(parseDate(item.find('td.nn-date').text(), ['HH:mmA', 'MMM-DD']), -4),
pubDate: timezone(parseDate(item.find('td.news_date-cell').text(), ['HH:mmA', 'MMM-DD']), -4),
};
})
.filter((item) => item.title);
Expand Down

0 comments on commit bb3d1b4

Please sign in to comment.