增加:哈尔滨工程大学本科生院工作通知 (#632)
This commit is contained in:
parent
1d8bb6255d
commit
f4dc092a6e
|
|
@ -409,6 +409,16 @@ RSSHub 同时支持 RSS 2.0、Atom 和 [JSON Feed](https://jsonfeed.org/) 输出
|
|||
| -------- | -------- |
|
||||
| notice | news |
|
||||
|
||||
### 哈尔滨工程大学
|
||||
|
||||
#### 本科生院工作通知 <Author uid="XYenon"/>
|
||||
|
||||
举例: <https://rsshub.app/heu/ugs/news>
|
||||
|
||||
路由: `/heu/ugs/news`
|
||||
|
||||
参数: 无
|
||||
|
||||
## 传统媒体类
|
||||
|
||||
### 央视新闻
|
||||
|
|
|
|||
|
|
@ -494,6 +494,9 @@ router.get('/cas/sim/academic', require('./routes/universities/cas/sim/academic'
|
|||
// 南京邮电大学
|
||||
router.get('/njupt/jwc/:type?', require('./routes/universities/njupt/jwc'));
|
||||
|
||||
// 哈尔滨工程大学
|
||||
router.get('/heu/ugs/news', require('./routes/universities/heu/ugs/news'));
|
||||
|
||||
// ifanr
|
||||
router.get('/ifanr/appso', require('./routes/ifanr/appso'));
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
const axios = require('../../../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'http://ugs.hrbeu.edu.cn/2821/list.htm',
|
||||
headers: {
|
||||
Referer: 'http://ugs.hrbeu.edu.cn',
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('.wp_article_list_table .border9');
|
||||
|
||||
ctx.state.data = {
|
||||
title: '哈尔滨工程大学本科生院工作通知',
|
||||
link: 'http://ugs.hrbeu.edu.cn/2821/list.htm',
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.find('a').text(),
|
||||
pubDate: new Date(item.find('.date').text()).toUTCString(),
|
||||
link: `http://ugs.hrbeu.edu.cn${item.find('a').attr('href')}`,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue