Files
RSSHub/lib/v2/nikkei/radar.js
T
Ethan Shen ca9efda5d4 fix(route): 日本经济新闻中文版 (#11994)
* fix(route): 日本经济新闻中文版

* fix: missing language

* refactor: migrate nikkei to v2

* refactor: merge nikkei-cn into nikkei

* refactor: merge nikkei-asia into nikkei

---------
2023-03-06 23:52:11 +08:00

60 lines
2.3 KiB
JavaScript

module.exports = {
'nikkei.com': {
_name: '日本经济新闻',
asia: [
{
title: 'Latest News',
docs: 'https://docs.rsshub.app/traditional-media.html#ri-ben-jing-ji-xin-wen',
source: '/',
target: '/nikkei/asia',
},
],
cn: [
{
title: '中文版新闻',
docs: 'https://docs.rsshub.app/traditional-media.html#ri-ben-jing-ji-xin-wen-zhong-wen-ban-xin-wen',
source: ['/:category/:type', '/:category', '/'],
target: (params) => {
if (params.category && params.type) {
return `/nikkei/cn/cn/${params.category}/${params.type.replace('.html', '')}`;
} else if (params.category && !params.type) {
return `/nikkei/cn/cn/${params.category.replace('.html', '')}`;
} else {
return `/nikkei/cn/cn`;
}
},
},
],
www: [
{
title: 'ホームページ',
docs: 'https://docs.rsshub.app/traditional-media.html#ri-ben-jing-ji-xin-wen',
source: '/',
target: '/nikkei/index',
},
{
title: '新聞',
docs: 'https://docs.rsshub.app/traditional-media.html#ri-ben-jing-ji-xin-wen',
source: ['/:category/archive', '/:category'],
target: '/nikkei/:category',
},
],
'zh.cn': [
{
title: '中文版新聞',
docs: 'https://docs.rsshub.app/traditional-media.html#ri-ben-jing-ji-xin-wen-zhong-wen-ban-xin-wen',
source: ['/:category/:type', '/:category', '/'],
target: (params) => {
if (params.category && params.type) {
return `/nikkei/cn/zh/${params.category}/${params.type.replace('.html', '')}`;
} else if (params.category && !params.type) {
return `/nikkei/cn/zh/${params.category.replace('.html', '')}`;
} else {
return `/nikkei/cn/zh`;
}
},
},
],
},
};