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:
Crafty
2023-01-11 06:51:07 -03:00
committed by GitHub
parent 0f01c3d35b
commit 00abda0a7c
5 changed files with 69 additions and 0 deletions
+12
View File
@@ -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>
## 郑州大学
### 郑州大学新闻网
+40
View File
@@ -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,
};
};
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
'/jwc/:type?': ['CCraftY'],
};
+11
View File
@@ -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',
},
],
},
};
+3
View File
@@ -0,0 +1,3 @@
module.exports = function (router) {
router.get('/jwc/:type?', require('./jwc'));
};