Skip to content

Commit

Permalink
fix(route): 日本经济新闻中文版 (DIYgod#11994)
Browse files Browse the repository at this point in the history
* fix(route): 日本经济新闻中文版

* fix: missing language

* refactor: migrate nikkei to v2

* refactor: merge nikkei-cn into nikkei

* refactor: merge nikkei-asia into nikkei

---------
  • Loading branch information
nczitzk authored Mar 6, 2023
1 parent 1878fca commit ca9efda
Show file tree
Hide file tree
Showing 22 changed files with 351 additions and 376 deletions.
1 change: 0 additions & 1 deletion assets/radar-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@
{ title: '标签最近更新', docs: 'https://docs.rsshub.app/multimedia.html#mqube', source: '/search/tag/:tag', target: '/mqube/tag/:tag' },
],
},
'nikkei.com': { _name: '日本経済新聞', www: [{ title: 'ホームページ', docs: 'https://docs.rsshub.app/traditional-media.html#ri-ben-jing-ji-xin-wen', source: '/', target: '/nikkei/index' }] },
'last.fm': {
_name: 'Last.fm',
www: [
Expand Down
28 changes: 21 additions & 7 deletions docs/en/traditional-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,17 +350,11 @@ Only `s00017` is in English.
| hi | id | ko | fa | pt | ru | es |

| Kiswahili | ภาษาไทย | Türkçe | Українська | اردو | Tiếng Việt |
| --------- | | ------- | ------ | ---------- | ---- | ---------- |
| --------- | ------- | ------ | ---------- | ---- | ---------- |
| sw | th | tr | uk | ur | vi |

</RouteEn>

## Nikkei Asia

### Latest News

<RouteEn author="rainrdx" example="/nikkei-asia" path="/nikkei-asia"/>

## Radio Free Asia (RFA)

### News
Expand Down Expand Up @@ -660,6 +654,26 @@ Provides all of the articles by the specified New York Times author.
| series-books|
| young-adult-hardcover|

## The Nikkei 日本経済新聞

### Home

<RouteEn author="zjysdhr" example="/nikkei/index" path="/nikkei/index" radar="1" rssbud="1" />

### News

<RouteEn author="Arracc" example="/nikkei/news" path="/nikkei/:category/:article_type?" :paramsDesc="['Category, see table below','Only includes free articles, set `free` to enable, disabled by default']">

| 総合 | オピニオン | 経済 | 政治 | 金融 | マーケット | ビジネス | マネーのまなび | テック | 国際 | スポーツ | 社会・調査 | 地域 | 文化 | ライフスタイル |
| ---- | --------- | ------- | -------- | --------- | -------- | ------- | ----------- | ---------- | ------------- | ------- | --------- | ------- | ------- | ------------- |
| news | opinion | economy | politics | financial | business | 不支持 | 不支持 | technology | international | sports | society | local | culture | lifestyle |

</RouteEn>

### Nikkei Asia Latest News

<RouteEn author="rainrdx" example="/nikkei/asia" path="/nikkei/asia" radar="1"/>

## The Wall Street Journal (WSJ)

### News
Expand Down
48 changes: 20 additions & 28 deletions docs/traditional-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,6 @@ pageClass: routes

</Route>

## Nikkei Asia

### 最新新闻

<Route author="rainrdx" example="/nikkei-asia" path="/nikkei-asia"/>

## Now 新聞

### 新聞
Expand Down Expand Up @@ -1069,7 +1063,7 @@ IT・科学 tech_science

### 最新报道

<Route author="Rongronggg9" example="/kyodonews" path="/kyodonews/:language?/:keyword?" :paramsDesc="['语言: `china` = 简体中文 (默认), `tchina` = 繁體中文', '关键词']">
<Route author="Rongronggg9" example="/kyodonews" path="/kyodonews/:language?/:keyword?" :paramsDesc="['语言: `china` = 简体中文 (默认), `tchina` = 繁體中文', '关键词']">

`keyword` 为关键词,由于共同网有许多关键词并不在主页列出,此处不一一列举,可从关键词页的 URL 的最后一级路径中提取。如 `日中关系` 的关键词页 URL 为 `https://china.kyodonews.net/news/japan-china_relationship`, 则将 `japan-china_relationship` 填入 `keyword`。特别地,当填入 `rss` 时,将从共同网官方 RSS 中抓取文章;略去时,将从首页抓取最新报道 (注意:首页更新可能比官方 RSS 稍慢)。

Expand Down Expand Up @@ -1938,45 +1932,43 @@ category 对应的关键词有

</Route>

## 日本经济新闻中文版
## 日本经济新闻

### 新闻
### 首页

<Route author="nczitzk" example="/nikkei-cn" path="/nikkei-cn/:language?/:category?/:type?" :paramsDesc="['语言,可选 `zh` 即 繁体中文,`cn` 即 简体中文', '分类,默认为空,可在对应分类页 URL 中找到', '子分类,默认为空,可在对应分类页 URL 中找到']" radar="1" rssbud="1">
<Route author="zjysdhr" example="/nikkei/index" path="/nikkei/index" radar="1" rssbud="1" />

::: tip 提示
### 新聞

[中国 经济 日经中文网](https://cn.nikkei.com/china/ceconomy.html) 的 URL 为 <https://cn.nikkei.com/china/ceconomy.html> 对应路由为 [`/nikkei-cn/cn/china/ceconomy`](https://rsshub.app/nikkei-cn/cn/china/ceconomy)
<Route author="Arracc" example="/nikkei/news" path="/nikkei/:category/:article_type?" :paramsDesc="['版块', '文章类型,`free` 仅无料全文,缺省为无料全文、有料非全文']">

[中國 經濟 日經中文網](https://zh.cn.nikkei.com/china/ceconomy.html) 的 URL 为 <https://zh.cn.nikkei.com/china/ceconomy.html> 对应路由为 [`/nikkei-cn/zh/china/ceconomy`](https://rsshub.app/nikkei-cn/zh/china/ceconomy)
综合页文章标题添加板块标签

特别地,当 `category` 填入 `rss` 后(即路由为 [`/nikkei-cn/cn/rss`](https://rsshub.app/nikkei-cn/cn/rss)),此时返回的是 [官方 RSS 的内容](https://cn.nikkei.com/rss.html)

:::
| 総合 | オピニオン | 経済 | 政治 | 金融 | マーケット | ビジネス | マネーのまなび | テック | 国際 | スポーツ | 社会・調査 | 地域 | 文化 | ライフスタイル |
| ---- | ------- | ------- | -------- | --------- | -------- | ---- | ------- | ---------- | ------------- | ------ | ------- | ----- | ------- | --------- |
| news | opinion | economy | politics | financial | business | 不支持 | 不支持 | technology | international | sports | society | local | culture | lifestyle |

</Route>

## 日本経済新聞
### 中文版新闻

### ホームページ
<Route author="nczitzk" example="/nikkei/cn" path="/nikkei/cn/:language?/:path?" :paramsDesc="['语言,可选 `zh` 即 繁体中文,`cn` 即 简体中文', '类目路径,默认为空,可在对应类目页 URL 中找到']" radar="1" rssbud="1">

<Route author="zjysdhr" example="/nikkei/index" path="/nikkei/index" radar="1" rssbud="1">
::: tip 提示

日文版首页
[中国 经济 日经中文网](https://cn.nikkei.com/china/ceconomy.html) 的 URL 为 <https://cn.nikkei.com/china/ceconomy.html> 对应路由为 [`/nikkei/cn/cn/china/ceconomy`](https://rsshub.app/nikkei/cn/cn/china/ceconomy)

</Route>
[中國 經濟 日經中文網](https://zh.cn.nikkei.com/china/ceconomy.html) 的 URL 为 <https://zh.cn.nikkei.com/china/ceconomy.html> 对应路由为 [`/nikkei/cn/zh/china/ceconomy`](https://rsshub.app/nikkei/cn/zh/china/ceconomy)

### 新聞
特别地,当 `path` 填入 `rss` 后(如路由为 [`/nikkei/cn/cn/rss`](https://rsshub.app/nikkei/cn/cn/rss)),此时返回的是 [官方 RSS 的内容](https://cn.nikkei.com/rss.html)

<Route author="Arracc" example="/nikkei/news" path="/nikkei/:category/:article_type?" :paramsDesc="['版块','文章类型,free 仅无料全文,缺省为无料全文、有料非全文']">
:::

综合页文章标题添加板块标签
</Route>

| 総合 | マネーのまなび | 経済・金融 | 政治 | ビジネス | マネーのまなび | テクノロジー | 国際 | スポーツ | 社会・くらし | オピニオン | 文化 | FT | 地域 | 日経ビジネス | ライフ |
| ---- | ------- | ------- | -------- | -------- | ------- | ---------- | ------------- | ------ | ------- | ------- | ------- | --- | ----- | ------ | --- |
| news | 未支持 | economy | politics | business | 未支持 | technology | international | sports | society | opinion | culture | 未支持 | local | 未支持 | 未支持 |
### Nikkei Asia 最新新闻

</Route>
<Route author="rainrdx" example="/nikkei/asia" path="/nikkei/asia" radar="1"/>

## 厦门网

Expand Down
11 changes: 0 additions & 11 deletions lib/radar-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,17 +411,6 @@ module.exports = {
},
],
},
'nikkei.com': {
_name: '日本経済新聞',
www: [
{
title: 'ホームページ',
docs: 'https://docs.rsshub.app/traditional-media.html#ri-ben-jing-ji-xin-wen',
source: '/',
target: '/nikkei/index',
},
],
},
'last.fm': {
_name: 'Last.fm',
www: [
Expand Down
4 changes: 2 additions & 2 deletions lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -2402,8 +2402,8 @@ router.get('/coronavirus/yahoo-japan/:tdfk?', lazyloadRouteHandler('./routes/cor
router.get('/njfu/jwc/:category?', lazyloadRouteHandler('./routes/universities/njfu/jwc'));

// 日本経済新聞
router.get('/nikkei/index', lazyloadRouteHandler('./routes/nikkei/index'));
router.get('/nikkei/:category/:article_type?', lazyloadRouteHandler('./routes/nikkei/news'));
// router.get('/nikkei/index', lazyloadRouteHandler('./routes/nikkei/index'));
// router.get('/nikkei/:category/:article_type?', lazyloadRouteHandler('./routes/nikkei/news'));

// MQube
router.get('/mqube/user/:user', lazyloadRouteHandler('./routes/mqube/user'));
Expand Down
34 changes: 0 additions & 34 deletions lib/routes/nikkei/index.js

This file was deleted.

155 changes: 0 additions & 155 deletions lib/routes/nikkei/news.js

This file was deleted.

3 changes: 0 additions & 3 deletions lib/v2/nikkei-asia/maintainer.js

This file was deleted.

13 changes: 0 additions & 13 deletions lib/v2/nikkei-asia/radar.js

This file was deleted.

3 changes: 0 additions & 3 deletions lib/v2/nikkei-asia/router.js

This file was deleted.

Loading

0 comments on commit ca9efda

Please sign in to comment.