diff --git a/assets/radar-rules.js b/assets/radar-rules.js index bcde96474..a311519ae 100644 --- a/assets/radar-rules.js +++ b/assets/radar-rules.js @@ -403,4 +403,21 @@ }, ], }, + 'swufe.edu.cn': { + _name: '西南财经大学', + it: [ + { + title: '经济信息工程学院 - 通知公告', + docs: 'https://docs.rsshub.app/university.html#%E7%BB%8F%E6%B5%8E%E4%BF%A1%E6%81%AF%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2', + source: '/index/tzgg.htm', + target: '/universities/swufe/seie/tzgg', + }, + { + title: '经济信息工程学院 - 学院新闻', + docs: 'https://docs.rsshub.app/university.html#%E7%BB%8F%E6%B5%8E%E4%BF%A1%E6%81%AF%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2', + source: '/index/xyxw.htm', + target: '/universities/swufe/seie/xyxw', + }, + ], + }, }); diff --git a/lib/routes/universities/swufe/seie/index.js b/lib/routes/universities/swufe/seie/index.js index 7023fa11c..7950bf2db 100644 --- a/lib/routes/universities/swufe/seie/index.js +++ b/lib/routes/universities/swufe/seie/index.js @@ -12,23 +12,25 @@ module.exports = async (ctx) => { const suffix = map.get(type).suffix; const link = listUrl + suffix; + const response = await got.get(link); const data = response.data; + const $ = cheerio.load(data); - const list = $('div[class="article-list"] ul li a') + const list = $('.article-list li a') .slice(0, 10) - .map(function() { + .map((_, elem) => { const info = { - link: $(this) + link: $(elem) .attr('href') .slice(2), - title: $(this) + title: $(elem) .children('span') .first() .text(), - date: $(this) + date: $(elem) .children('span') .last() .text(),