mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-10 15:21:59 +08:00
feat: 添加华水的学校新闻、学校文件及学术动态 (#3663)
This commit is contained in:
@@ -392,7 +392,13 @@ category 列表:
|
|||||||
|
|
||||||
### 学校通知
|
### 学校通知
|
||||||
|
|
||||||
<Route author="vuhe" example="/ncwu/notice" path="/universities/ncwu/notice" />
|
<Route author="vuhe" example="/ncwu/notice" path="/universities/ncwu/:category" :paramsDesc="['分类']" >
|
||||||
|
|
||||||
|
| 学校新闻 | 学校通知 | 学校文件 | 学术动态 |
|
||||||
|
| -------- | -------- | -------- | ----------- |
|
||||||
|
| news | notice | file | scholarship |
|
||||||
|
|
||||||
|
</Route>
|
||||||
|
|
||||||
## 华南理工大学
|
## 华南理工大学
|
||||||
|
|
||||||
|
|||||||
@@ -724,7 +724,10 @@ router.get('/upc/main/:type?', require('./routes/universities/upc/main'));
|
|||||||
router.get('/upc/jsj/:type?', require('./routes/universities/upc/jsj'));
|
router.get('/upc/jsj/:type?', require('./routes/universities/upc/jsj'));
|
||||||
|
|
||||||
// 华北水利水电大学
|
// 华北水利水电大学
|
||||||
|
router.get('/ncwu/file', require('./routes/universities/ncwu/file'));
|
||||||
|
router.get('/ncwu/news', require('./routes/universities/ncwu/news'));
|
||||||
router.get('/ncwu/notice', require('./routes/universities/ncwu/notice'));
|
router.get('/ncwu/notice', require('./routes/universities/ncwu/notice'));
|
||||||
|
router.get('/ncwu/scholarship', require('./routes/universities/ncwu/scholarship'));
|
||||||
|
|
||||||
// ifanr
|
// ifanr
|
||||||
router.get('/ifanr/:channel?', require('./routes/ifanr/index'));
|
router.get('/ifanr/:channel?', require('./routes/ifanr/index'));
|
||||||
|
|||||||
34
lib/routes/universities/ncwu/file.js
Normal file
34
lib/routes/universities/ncwu/file.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
const got = require('@/utils/got');
|
||||||
|
const date = require('@/utils/date');
|
||||||
|
const cheerio = require('cheerio');
|
||||||
|
|
||||||
|
const baseUrl = 'https://www5.ncwu.edu.cn/channels/58.html';
|
||||||
|
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const response = await got.get(baseUrl);
|
||||||
|
const $ = cheerio.load(response.data);
|
||||||
|
const list = $('div.xinxilist>ul>li');
|
||||||
|
|
||||||
|
ctx.state.data = {
|
||||||
|
title: '华水-学校文件',
|
||||||
|
link: baseUrl,
|
||||||
|
item:
|
||||||
|
list &&
|
||||||
|
list
|
||||||
|
.map((index, item) => ({
|
||||||
|
title: $(item)
|
||||||
|
.find('span')
|
||||||
|
.text(),
|
||||||
|
description: `文件下载请转跳详情页`,
|
||||||
|
pubDate: date(
|
||||||
|
$(item)
|
||||||
|
.find('i')
|
||||||
|
.text()
|
||||||
|
),
|
||||||
|
link: $(item)
|
||||||
|
.find('a')
|
||||||
|
.attr('href'),
|
||||||
|
}))
|
||||||
|
.get(),
|
||||||
|
};
|
||||||
|
};
|
||||||
34
lib/routes/universities/ncwu/news.js
Normal file
34
lib/routes/universities/ncwu/news.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
const got = require('@/utils/got');
|
||||||
|
const date = require('@/utils/date');
|
||||||
|
const cheerio = require('cheerio');
|
||||||
|
|
||||||
|
const baseUrl = 'https://www5.ncwu.edu.cn/channels/4.html';
|
||||||
|
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const response = await got.get(baseUrl);
|
||||||
|
const $ = cheerio.load(response.data);
|
||||||
|
const list = $('div.xinxilist>ul>li');
|
||||||
|
|
||||||
|
ctx.state.data = {
|
||||||
|
title: '华水-学校新闻',
|
||||||
|
link: baseUrl,
|
||||||
|
item:
|
||||||
|
list &&
|
||||||
|
list
|
||||||
|
.map((index, item) => ({
|
||||||
|
title: $(item)
|
||||||
|
.find('span')
|
||||||
|
.text(),
|
||||||
|
description: `详情请点击查看`,
|
||||||
|
pubDate: date(
|
||||||
|
$(item)
|
||||||
|
.find('i')
|
||||||
|
.text()
|
||||||
|
),
|
||||||
|
link: $(item)
|
||||||
|
.find('a')
|
||||||
|
.attr('href'),
|
||||||
|
}))
|
||||||
|
.get(),
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -20,21 +20,23 @@ module.exports = async (ctx) => {
|
|||||||
.find('span')
|
.find('span')
|
||||||
.text(),
|
.text(),
|
||||||
description:
|
description:
|
||||||
`发自「` +
|
`来自「` +
|
||||||
$(item)
|
$(item)
|
||||||
.find('a.dw')
|
.find('a.dw')
|
||||||
.text() +
|
.text() +
|
||||||
`」`,
|
`」于 ` +
|
||||||
|
$(item)
|
||||||
|
.find('i')
|
||||||
|
.text(),
|
||||||
pubDate: date(
|
pubDate: date(
|
||||||
$(item)
|
$(item)
|
||||||
.find('i')
|
.find('i')
|
||||||
.text()
|
.text()
|
||||||
),
|
),
|
||||||
link:
|
link: $(item)
|
||||||
baseUrl +
|
.find('a.dw')
|
||||||
$(item)
|
.next()
|
||||||
.find('a[target=_blank]')
|
.attr('href'),
|
||||||
.attr('href'),
|
|
||||||
}))
|
}))
|
||||||
.get(),
|
.get(),
|
||||||
};
|
};
|
||||||
|
|||||||
34
lib/routes/universities/ncwu/scholarship.js
Normal file
34
lib/routes/universities/ncwu/scholarship.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
const got = require('@/utils/got');
|
||||||
|
const date = require('@/utils/date');
|
||||||
|
const cheerio = require('cheerio');
|
||||||
|
|
||||||
|
const baseUrl = 'https://www5.ncwu.edu.cn/channels/2766.html';
|
||||||
|
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const response = await got.get(baseUrl);
|
||||||
|
const $ = cheerio.load(response.data);
|
||||||
|
const list = $('div.xinxilist>ul>li');
|
||||||
|
|
||||||
|
ctx.state.data = {
|
||||||
|
title: '华水-学术动态',
|
||||||
|
link: baseUrl,
|
||||||
|
item:
|
||||||
|
list &&
|
||||||
|
list
|
||||||
|
.map((index, item) => ({
|
||||||
|
title: $(item)
|
||||||
|
.find('span')
|
||||||
|
.text(),
|
||||||
|
description: `详情请点击查看`,
|
||||||
|
pubDate: date(
|
||||||
|
$(item)
|
||||||
|
.find('i')
|
||||||
|
.text()
|
||||||
|
),
|
||||||
|
link: $(item)
|
||||||
|
.find('a')
|
||||||
|
.attr('href'),
|
||||||
|
}))
|
||||||
|
.get(),
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user