mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat(route): 增加浙江中医药大学教务处 (#11579)
* Update university.md * Add files via upload * Update docs/university.md * Update docs/university.md * Update lib/v2/zcmu/radar.js * modified: package.json * add pubDate * Delete package.json * Add files via upload
This commit is contained in:
@@ -3247,6 +3247,18 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS
|
||||
|
||||
</Route>
|
||||
|
||||
## 浙江中医药大学
|
||||
|
||||
### 教务处
|
||||
|
||||
<Route author="CCraftY" example="/zcmu/jwc/1" path="/zcmu/jwc/:type?" :paramsDesc="['通知模块id']">
|
||||
|
||||
| 成绩管理 | 学籍管理 | 考试管理 | 选课管理 | 排课管理 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| 1 | 2 | 3 | 4 | 5 |
|
||||
|
||||
</Route>
|
||||
|
||||
## 郑州大学
|
||||
|
||||
### 郑州大学新闻网
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
const host = 'https://jwc.zcmu.edu.cn/jwgl';
|
||||
|
||||
const map = new Map([
|
||||
[1, { title: '教务处 -- 成绩管理', id: 'cjgl' }],
|
||||
[2, { title: '教务处 -- 学籍管理', id: 'xjgl' }],
|
||||
[3, { title: '教务处 -- 考试管理', id: 'ksgl' }],
|
||||
[4, { title: '教务处 -- 选课管理', id: 'xkgl' }],
|
||||
[5, { title: '教务处 -- 排课管理', id: 'pkgl' }],
|
||||
]);
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const type = parseInt(ctx.params.type);
|
||||
const id = map.get(type).id;
|
||||
const res = await got({
|
||||
method: 'get',
|
||||
url: `${host}/${id}.htm`,
|
||||
});
|
||||
|
||||
const $ = cheerio.load(res.data);
|
||||
const items = $('.winstyle196327 tr:lt(20)')
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.find('a').attr('title'),
|
||||
link: `https://jwc.zcmu.edu.cn/${item.find('a').attr('href')}`,
|
||||
pubDate: parseDate(item.find('span.timestyle196327').text().trim()),
|
||||
};
|
||||
})
|
||||
.get();
|
||||
|
||||
ctx.state.data = {
|
||||
title: map.get(type).title,
|
||||
link: `${host}/${id}`,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/jwc/:type?': ['CCraftY'],
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
'zcmu.edu.cn': {
|
||||
_name: '浙江中医药大学',
|
||||
'.': [
|
||||
{
|
||||
title: '教务处',
|
||||
docs: 'https://docs.rsshub.app/university.html#zhe-jiang-zhong-yi-yao-da-xue',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = function (router) {
|
||||
router.get('/jwc/:type?', require('./jwc'));
|
||||
};
|
||||
Reference in New Issue
Block a user