diff --git a/lib/routes/gov/cn/namespace.ts b/lib/routes/gov/cn/namespace.ts new file mode 100644 index 000000000..9f7bf578c --- /dev/null +++ b/lib/routes/gov/cn/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国政府网', + url: 'www.gov.cn/', + categories: ['government'], + description: '', +}; diff --git a/lib/routes/gov/news/index.ts b/lib/routes/gov/cn/news/index.ts similarity index 90% rename from lib/routes/gov/news/index.ts rename to lib/routes/gov/cn/news/index.ts index 28cc5c170..020f11d63 100644 --- a/lib/routes/gov/news/index.ts +++ b/lib/routes/gov/cn/news/index.ts @@ -7,9 +7,9 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; export const route: Route = { - path: '/news/:uid', + path: '/cn/news/:uid', categories: ['government'], - example: '/gov/news/bm', + example: '/gov/cn/news/bm', parameters: { uid: '分类名' }, features: { requireConfig: false, @@ -20,11 +20,11 @@ export const route: Route = { supportScihub: false, }, name: '政府新闻', - maintainers: ['EsuRt'], + maintainers: ['EsuRt', 'howfool'], handler, - description: `| 政务部门 | 滚动新闻 | 新闻要闻 | 国务院新闻 | 政策文件 | - | :------: | :------: | :------: | :--------: | :------: | - | bm | gd | yw | gwy | zhengce |`, + description: `| 政务部门 | 滚动新闻 | 新闻要闻 | 国务院新闻 | 国务院工作会议 | 政策文件 | +| :------: | :------: | :------: | :--------: | :------------: | :------: | +| bm | gd | yw | gwy | gwyzzjg | zhengce |`, }; async function handler(ctx) { @@ -55,6 +55,10 @@ async function handler(ctx) { url = 'http://sousuo.gov.cn/s.htm?t=zhengcelibrary'; title = '中国政府网 - 政策文件'; break; + case 'gwyzzjg': + url = `${originDomain}/gwyzzjg/huiyi/`; + title = '中国政府网 - 国务院工作会议'; + break; default: logger.error('pattern not matched'); } @@ -119,7 +123,7 @@ async function handler(ctx) { link: contentUrl, pubDate, author, - category, + category: category.filter(Boolean), }; }); })