Skip to content

Commit

Permalink
fix(route/rss): Manually set RSS version when parsing (#16973)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzx-dzx authored Oct 1, 2024
1 parent 8ec9235 commit 24c5045
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/routes/nikkei/cn/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ import got from '@/utils/got';
import { load } from 'cheerio';
import timezone from '@/utils/timezone';
import { parseDate } from '@/utils/parse-date';
import parser from '@/utils/rss-parser';
import { config } from '@/config';
import Parser from 'rss-parser';

const parser = new Parser({
customFields: {
item: ['magnet'],
},
headers: {
'User-Agent': config.ua,
},
defaultRSS: 0.9,
});

export const route: Route = {
path: '/cn/*',
Expand Down

0 comments on commit 24c5045

Please sign in to comment.