mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-16 02:42:57 +08:00
feat: 增加井冈山大学教务处订阅源 (#3345)
This commit is contained in:
@@ -436,6 +436,12 @@ category 列表:
|
||||
|
||||
<Route author="RayHY" example="/hust/aia/news" path="/universities/hust/aia/news" />
|
||||
|
||||
## 井冈山大学
|
||||
|
||||
### 教务处通知
|
||||
|
||||
<Route author="Bernard" example="/jgsu/jwc" path="/universities/jgsu/jwc" />
|
||||
|
||||
## 华中师范大学
|
||||
|
||||
### 就业信息
|
||||
|
||||
@@ -660,6 +660,9 @@ router.get('/hust/auto/news/', require('./routes/universities/hust/aia/news'));
|
||||
router.get('/hust/aia/news/', require('./routes/universities/hust/aia/news'));
|
||||
router.get('/hust/aia/notice/:type?', require('./routes/universities/hust/aia/notice'));
|
||||
|
||||
// 井冈山大学
|
||||
router.get('/jgsu/jwc', require('./routes/universities/jgsu/jwc'));
|
||||
|
||||
// 中南大学
|
||||
router.get('/csu/job/:type?', require('./routes/universities/csu/job'));
|
||||
|
||||
|
||||
39
lib/routes/universities/jgsu/jwc.js
Normal file
39
lib/routes/universities/jgsu/jwc.js
Normal file
@@ -0,0 +1,39 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const baseUrl = 'http://jwc.jgsu.edu.cn/jwtz';
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: baseUrl,
|
||||
});
|
||||
const data = response.data;
|
||||
const $ = cheerio.load(data);
|
||||
const ul = $('.xn_c_sv_20_li');
|
||||
ctx.state.data = {
|
||||
link: baseUrl,
|
||||
title: '井冈山大学教务处',
|
||||
item: ul
|
||||
.map((_, item) => ({
|
||||
link:
|
||||
baseUrl +
|
||||
$(item)
|
||||
.find('a')
|
||||
.attr('href')
|
||||
.slice(1),
|
||||
title: $(item)
|
||||
.find('a')
|
||||
.text(),
|
||||
discription: $(item)
|
||||
.find('.xn_c_sv_20_text')
|
||||
.text(),
|
||||
pubDate: new Date(
|
||||
$(item)
|
||||
.find('.time')
|
||||
.text()
|
||||
.replace('[', '')
|
||||
.replace(']', '')
|
||||
).toUTCString(),
|
||||
}))
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user