diff --git a/docs/government.md b/docs/government.md index e4615c04f6..203a5a6989 100644 --- a/docs/government.md +++ b/docs/government.md @@ -470,6 +470,12 @@ pageClass: routes +## 济南市卫生健康委员会 + +### 获取国家医师资格考试通知 + + + ## 江苏省人民政府 ### 动态 diff --git a/lib/v2/gov/jinan/healthcommission/medical_exam_notice.js b/lib/v2/gov/jinan/healthcommission/medical_exam_notice.js new file mode 100644 index 0000000000..e075639853 --- /dev/null +++ b/lib/v2/gov/jinan/healthcommission/medical_exam_notice.js @@ -0,0 +1,48 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); +const timezone = require('@/utils/timezone'); +const { parseDate } = require('@/utils/parse-date'); + +module.exports = async (ctx) => { + const baseUrl = 'https://jnmhc.jinan.gov.cn'; + + const res = await got('https://jnmhc.jinan.gov.cn/module/web/jpage/dataproxy.jsp', { + searchParams: { + page: 1, + webid: 28, + path: '/', + columnid: 14418, + unitid: 18878, + webname: '济南市卫生健康委员会', + permissiontype: 0, + }, + }); + + const $ = cheerio.load(res.data, {xmlMode: true}); + + const list = $('record'); + + ctx.state.data = { + title: '济南卫建委-执业考试通知', + link: `${baseUrl}/col/col14418/index.html`, + item: list.map((_, item) => { + // 获取每个item对应的html字符串 + item = $(item).text(); + + // 解析上一步中的html + const html = cheerio.load(item); + + const title = html('td[width="620"] a').attr('title'); + const link = html('td[width="620"] a').attr('href'); + const date = timezone(parseDate(html('td[width="100"]').text()), +8); + return { + title, + description: title, + pubDate: date, + link, + author: '济南市卫生健康委员会', + }; + }) + .get(), + }; +}; diff --git a/lib/v2/gov/maintainer.js b/lib/v2/gov/maintainer.js index e4b1b2e9a0..1f0f25df79 100644 --- a/lib/v2/gov/maintainer.js +++ b/lib/v2/gov/maintainer.js @@ -17,6 +17,7 @@ module.exports = { '/customs/list/:gchannel?': ['Jeason0228', 'TonyRL', 'he1q'], '/fmprc/:category?': ['nicolaszf', 'nczitzk'], '/immiau/news': ['liu233w'], + '/jinan/healthcommission/medical_exam_notice': ['tzjyxb'], '/mee/ywdt?': ['liuxsdev'], '/mfa/wjdt/:category?': ['nczitzk'], '/miit/wjfb/:ministry': ['Fatpandac'], diff --git a/lib/v2/gov/radar.js b/lib/v2/gov/radar.js index 248dc455e5..c300deee8b 100644 --- a/lib/v2/gov/radar.js +++ b/lib/v2/gov/radar.js @@ -572,6 +572,17 @@ module.exports = { }, ], }, + 'jinan.gov.cn': { + _name: '济南市卫生健康委员会', + jnmhc: [ + { + title: '获取国家医师资格考试通知', + docs: 'https://docs.rsshub.app/government.html#ji-nan-shi-wei-sheng-jian-kang-wei-yuan-hui', + source: ['', '/*'], + target: '/gov/jinan/healthcommission/medical_exam_notice', + }, + ], + }, 'maoming.gov.cn': { _name: '茂名市人民政府门户网站', '.': [ diff --git a/lib/v2/gov/router.js b/lib/v2/gov/router.js index 6cb5eb5171..811553fe83 100644 --- a/lib/v2/gov/router.js +++ b/lib/v2/gov/router.js @@ -9,6 +9,7 @@ module.exports = function (router) { router.get('/customs/list/:gchannel?', require('./customs/list')); router.get('/fmprc/:category?', require('./mfa/wjdt')); router.get('/immiau/news', require('./immiau/news')); + router.get('/jinan/healthcommission/medical_exam_notice', require('./jinan/healthcommission/medical_exam_notice')); router.get('/mee/ywdt/:category?', require('./mee/ywdt')); router.get('/mfa/wjdt/:category?', require('./mfa/wjdt')); router.get('/miit/wjfb/:ministry', require('./miit/wjfb'));