mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 14:07:54 +08:00
@@ -899,6 +899,18 @@ https://rsshub.app/**nuist**/`bulletin` 或 https://rsshub.app/**nuist**/`bullet
|
|||||||
|
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
|
## 中南大学
|
||||||
|
|
||||||
|
### 招聘信息
|
||||||
|
|
||||||
|
<Route author="csuhan" example="/csu/job" path="/universities/csu/job/:type?" :paramsDesc="['招聘类型']">
|
||||||
|
|
||||||
|
| 招聘类型 | 本部招聘 | 湘雅招聘 | 铁道招聘 | 在线招聘 | 事业招考 |
|
||||||
|
| -------- | -------- | -------- | -------- | -------- | -------- |
|
||||||
|
| 参数 | 1 | 2 | 3 | 4 | 5 |
|
||||||
|
|
||||||
|
</Route>
|
||||||
|
|
||||||
## 重庆大学
|
## 重庆大学
|
||||||
|
|
||||||
### 教务网通知公告
|
### 教务网通知公告
|
||||||
|
|||||||
@@ -634,6 +634,9 @@ router.get('/hust/auto/news/', require('./routes/universities/hust/aia/news'));
|
|||||||
router.get('/hust/aia/news/', require('./routes/universities/hust/aia/news'));
|
router.get('/hust/aia/news/', require('./routes/universities/hust/aia/news'));
|
||||||
router.get('/hust/aia/notice/:type?', require('./routes/universities/hust/aia/notice'));
|
router.get('/hust/aia/notice/:type?', require('./routes/universities/hust/aia/notice'));
|
||||||
|
|
||||||
|
// 中南大学
|
||||||
|
router.get('/csu/job/:type?', require('./routes/universities/csu/job'));
|
||||||
|
|
||||||
// 山东大学
|
// 山东大学
|
||||||
router.get('/sdu/sc/:type?', require('./routes/universities/sdu/sc'));
|
router.get('/sdu/sc/:type?', require('./routes/universities/sdu/sc'));
|
||||||
router.get('/sdu/cs/:type?', require('./routes/universities/sdu/cs'));
|
router.get('/sdu/cs/:type?', require('./routes/universities/sdu/cs'));
|
||||||
|
|||||||
37
lib/routes/universities/csu/job.js
Normal file
37
lib/routes/universities/csu/job.js
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
const got = require('@/utils/got');
|
||||||
|
const cheerio = require('cheerio');
|
||||||
|
const url = require('url').resolve;
|
||||||
|
|
||||||
|
const typeMaps = ['本部招聘', '湘雅招聘', '铁道招聘', '在线招聘', '事业招考'];
|
||||||
|
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const type = ctx.params.type || 1;
|
||||||
|
const link = 'http://jobsky.csu.edu.cn/Home/PartialArticleList';
|
||||||
|
const response = await got.post(link, {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
},
|
||||||
|
body: 'pageindex=1&pagesize=10&typeid=' + type + '&followingdates=-1',
|
||||||
|
});
|
||||||
|
const $ = cheerio.load('<html><body><table>' + response.data + '</table></body></html>');
|
||||||
|
const list = $('tr');
|
||||||
|
ctx.state.data = {
|
||||||
|
title: '中南大学招聘信息--' + typeMaps[parseInt(type) - 1],
|
||||||
|
link: link,
|
||||||
|
description: '中南大学招聘信息',
|
||||||
|
item:
|
||||||
|
list &&
|
||||||
|
list
|
||||||
|
.map((index, item) => {
|
||||||
|
item = $(item);
|
||||||
|
const pubDate = item.find('.spanDate').text();
|
||||||
|
return {
|
||||||
|
title: item.find('a').text(),
|
||||||
|
description: item.find('a').text(),
|
||||||
|
pubDate: new Date(pubDate).toUTCString(),
|
||||||
|
link: url('http://jobsky.csu.edu.cn/', item.find('a').attr('href')),
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.get(),
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user