mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-16 02:42:57 +08:00
@@ -607,6 +607,10 @@ https://rsshub.app/**nuist**/`bulletin` 或 https://rsshub.app/**nuist**/`bullet
|
|||||||
|
|
||||||
<Route name="数据科学与计算机学院动态" author="MegrezZhu" example="/sysu/sdcs" path="/sysu/sdcs" />
|
<Route name="数据科学与计算机学院动态" author="MegrezZhu" example="/sysu/sdcs" path="/sysu/sdcs" />
|
||||||
|
|
||||||
|
## 中国传媒大学
|
||||||
|
|
||||||
|
<Route name="中国传媒大学研究生招生网" author="YunYouJun" example="/cuc/yz" path="/cuc/yz" />
|
||||||
|
|
||||||
## 中国药科大学
|
## 中国药科大学
|
||||||
|
|
||||||
<Route name="中国药科大学" author="kba977" example="/cpu/home" path="/cpu/:type" :paramsDesc="['分类, 见下表']">
|
<Route name="中国药科大学" author="kba977" example="/cpu/home" path="/cpu/:type" :paramsDesc="['分类, 见下表']">
|
||||||
|
|||||||
@@ -636,6 +636,9 @@ router.get('/scnu/cs/match', require('./routes/universities/scnu/cs/match'));
|
|||||||
// 中国科学院
|
// 中国科学院
|
||||||
router.get('/cas/sim/academic', require('./routes/universities/cas/sim/academic'));
|
router.get('/cas/sim/academic', require('./routes/universities/cas/sim/academic'));
|
||||||
|
|
||||||
|
// 中国传媒大学
|
||||||
|
router.get('/cuc/yz', require('./routes/universities/cuc/yz'));
|
||||||
|
|
||||||
// 南京邮电大学
|
// 南京邮电大学
|
||||||
router.get('/njupt/jwc/:type?', require('./routes/universities/njupt/jwc'));
|
router.get('/njupt/jwc/:type?', require('./routes/universities/njupt/jwc'));
|
||||||
|
|
||||||
|
|||||||
39
lib/routes/universities/cuc/yz.js
Normal file
39
lib/routes/universities/cuc/yz.js
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
const axios = require('../../../utils/axios');
|
||||||
|
const cheerio = require('cheerio');
|
||||||
|
const url = require('url');
|
||||||
|
const iconv = require('iconv-lite');
|
||||||
|
|
||||||
|
const host = 'http://yz.cuc.edu.cn/';
|
||||||
|
|
||||||
|
/* 研究生招生网通知公告*/
|
||||||
|
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const response = await axios({
|
||||||
|
method: 'get',
|
||||||
|
url: host,
|
||||||
|
responseType: 'arraybuffer',
|
||||||
|
});
|
||||||
|
|
||||||
|
const responseHtml = iconv.decode(response.data, 'gbk');
|
||||||
|
const $ = cheerio.load(responseHtml);
|
||||||
|
|
||||||
|
const notice = $('#notice_area').children('.notice_block_top');
|
||||||
|
const content = notice.children('.notice_content1').children();
|
||||||
|
|
||||||
|
const items = content
|
||||||
|
.map((_, elem) => {
|
||||||
|
const a = $('a', elem);
|
||||||
|
return {
|
||||||
|
link: url.resolve(host, a.attr('href')),
|
||||||
|
title: a.text(),
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.get();
|
||||||
|
|
||||||
|
ctx.state.data = {
|
||||||
|
title: $('title').text(),
|
||||||
|
link: host,
|
||||||
|
description: '中国传媒大学研究生招生网 通知公告',
|
||||||
|
item: items,
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user