Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 浙江大学软件学院RSS #4016

Merged
merged 1 commit into from Feb 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/university.md
Expand Up @@ -1130,11 +1130,11 @@ https://rsshub.app/**nuist**/`bulletin` 或 https://rsshub.app/**nuist**/`bullet

### 浙大软件学院

<Route author="yonvenne" example="/zju/cst/1" path="/zju/cst/:type" :paramsDesc="['分类, 见下表']">
<Route author="yonvenne zwithz" example="/zju/cst/0" path="/zju/cst/:type" :paramsDesc="['分类, 见下表']">

| 全部通知 | 招生信息 | 教学管理 | 思政工作 | 实习就业 | 合作科研 |
| -------- | -------- | -------- | -------- | -------- | -------- |
| 0 | 1 | 2 | 3 | 4 | 5 |
| 全部通知 | 招生信息 | 教务管理 | 论文管理 | 思政工作 | 评奖评优 | 实习就业 | 国内合作科研 | 国际合作科研 |
| -------- | -------- | -------- | -------- | -------- | -------- | -------- | ------------ | ------------ |
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |

</Route>

Expand Down
18 changes: 11 additions & 7 deletions lib/routes/universities/zju/cst/index.js
@@ -1,20 +1,24 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');

const host = 'http://www.cst.zju.edu.cn/index.php?c=Index&a=tlist&catid=';
const host = 'http://www.cst.zju.edu.cn/';

const map = new Map([
[1, { id: '2', title: '浙大软件学院-招生信息' }],
[2, { id: '3', title: '浙大软件学院-教学管理' }],
[3, { id: '4', title: '浙大软件学院-思政工作' }],
[4, { id: '6', title: '浙大软件学院-实习就业' }],
[5, { id: '7', title: '浙大软件学院-合作科研' }],
[1, { id: '32178', title: '浙大软件学院-招生信息' }],
[2, { id: '36216', title: '浙大软件学院-教务管理' }],
[3, { id: '36217', title: '浙大软件学院-论文管理' }],
[4, { id: '36224', title: '浙大软件学院-思政工作' }],
[5, { id: '36228', title: '浙大软件学院-评奖评优' }],
[6, { id: '36233', title: '浙大软件学院-实习就业' }],
[7, { id: '36235', title: '浙大软件学院-国际实习' }],
[8, { id: '36194', title: '浙大软件学院-国内合作科研' }],
[9, { id: '36246', title: '浙大软件学院-国际合作科研' }],
]);

async function getPage(id) {
const res = await got({
method: 'get',
url: host + `${id}`,
url: host + `${id}` + '/list.htm',
});

const $ = cheerio.load(res.data);
Expand Down