fix(route): 修复中国传媒大学研究生招生网 (#10767)
* 修复中国传媒大学研究生招生网 * fix(route):修复中国传媒大学研究生招生网 * fix(route): 修复中国传媒大学研究生招生网 Co-authored-by: 牛鑫语 <niuxinyu@szbit.cn>
This commit is contained in:
parent
73d103b34e
commit
06d1d824e9
|
|
@ -3229,7 +3229,7 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS
|
|||
|
||||
### 中国传媒大学研究生招生网
|
||||
|
||||
<Route author="YunYouJun" example="/cuc/yz" path="/cuc/yz" />
|
||||
<Route author="YunYouJun niuyi1017" example="/cuc/yz" path="/cuc/yz" />
|
||||
|
||||
## 中国地质大学 (武汉)
|
||||
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ router.get('/cas/iee/kydt', lazyloadRouteHandler('./routes/universities/cas/iee/
|
|||
router.get('/cas/cg/:caty?', lazyloadRouteHandler('./routes/universities/cas/cg/index'));
|
||||
|
||||
// 中国传媒大学
|
||||
router.get('/cuc/yz', lazyloadRouteHandler('./routes/universities/cuc/yz'));
|
||||
// router.get('/cuc/yz', lazyloadRouteHandler('./v2/cuc/yz'));
|
||||
|
||||
// UTdallas ISSO
|
||||
router.get('/utdallas/isso', lazyloadRouteHandler('./routes/universities/utdallas/isso'));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
'/yz': ['niuyi1017'],
|
||||
};
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
'cuc.edu.cn': {
|
||||
_name: '中国传媒大学',
|
||||
yz: [
|
||||
{
|
||||
title: '研究生招生网',
|
||||
docs: 'https://docs.rsshub.app/university.html#zhong-guo-chuan-mei-da-xue',
|
||||
source: '/*',
|
||||
target: '/',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = function (router) {
|
||||
router.get('/yz', require('./yz'));
|
||||
};
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const url = require('url');
|
||||
const iconv = require('iconv-lite');
|
||||
|
||||
const host = 'http://yz.cuc.edu.cn/';
|
||||
|
|
@ -18,13 +17,12 @@ module.exports = async (ctx) => {
|
|||
const $ = cheerio.load(responseHtml);
|
||||
|
||||
const notice = $('#notice_area').children('.notice_block_top');
|
||||
const content = notice.children('.notice_content1').children();
|
||||
|
||||
const content = notice.children('.notice_content1').children('p');
|
||||
const items = content
|
||||
.map((_, elem) => {
|
||||
const a = $('a', elem);
|
||||
return {
|
||||
link: url.resolve(host, a.attr('href')),
|
||||
link: new URL(a.attr('href'), host).href,
|
||||
title: a.text(),
|
||||
};
|
||||
})
|
||||
Loading…
Reference in New Issue