feat: add 华南理工大学 土木与交通学院学工通知 (#5764)
Co-authored-by: Henry Wang <hi@henry.wang>
This commit is contained in:
parent
0c30c886ce
commit
2191eceda8
|
|
@ -3096,6 +3096,9 @@ router.get('/darwinawards/all', require('./routes/darwinawards/articles'));
|
|||
// 四川职业技术学院
|
||||
router.get('/scvtc/xygg', require('./routes/universities/scvtc/xygg'));
|
||||
|
||||
// 华南理工大学土木与交通学院
|
||||
router.get('/scut/scet/notice', require('./routes/universities/scut/scet/notice'));
|
||||
|
||||
// OneJAV
|
||||
router.get('/onejav/:type/:key?', require('./routes/onejav/one'));
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'http://www2.scut.edu.cn/jtxs/24241/list.htm',
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('#wp_news_w5 li');
|
||||
|
||||
|
||||
ctx.state.data = {
|
||||
title: '华南理工大学土木与交通学院 - 学工通知',
|
||||
link: 'http://www2.scut.edu.cn/jtxs/24241/list.htm',
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.find('li a').text(),
|
||||
description: item.find('li a').text(),
|
||||
link: item.find('li a').attr('href'),
|
||||
pubDate: item.find('.Article_PublishDate').text(),
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue