mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 14:40:23 +08:00
feat: 新增HNUST艺术学院计算机学院研究生院 (#4317)
This commit is contained in:
@@ -496,6 +496,24 @@ category 列表:
|
||||
|
||||
<Route author="Pretty9" example="/hnust/jwc" path="/hnust/jwc"/>
|
||||
|
||||
### 计算机科学与工程学院通知
|
||||
|
||||
<Route author="Pretty9" example="/hnust/computer" path="/hnust/computer">
|
||||
|
||||
### 艺术学院通知
|
||||
|
||||
<Route author="Pretty9" example="/hnust/art" path="/hnust/art">
|
||||
|
||||
### 研究生院招生工作
|
||||
|
||||
<Route author="Pretty9" example="/hnust/graduate/sszs" path="/hnust/graduate/:type?" :paramsDesc="['默认为 `sszs`']">
|
||||
|
||||
| 硕士招生 | 博士招生 |
|
||||
| -------- | -------- |
|
||||
| sszs | bszs |
|
||||
|
||||
</Route>
|
||||
|
||||
## 华北水利水电大学
|
||||
|
||||
### 学校通知
|
||||
|
||||
@@ -2414,6 +2414,9 @@ router.get('/dlmu/news/:type', require('./routes/universities/dlmu/news'));
|
||||
|
||||
// 湖南科技大学教务处
|
||||
router.get('/hnust/jwc', require('./routes/universities/hnust/jwc/index'));
|
||||
router.get('/hnust/computer', require('./routes/universities/hnust/computer/index'));
|
||||
router.get('/hnust/art', require('./routes/universities/hnust/art/index'));
|
||||
router.get('/hnust/graduate/:type?', require('./routes/universities/hnust/graduate/index'));
|
||||
|
||||
// AGE动漫
|
||||
router.get('/agefans/detail/:id', require('./routes/agefans/detail'));
|
||||
|
||||
34
lib/routes/universities/hnust/art/index.js
Normal file
34
lib/routes/universities/hnust/art/index.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const base = 'https://art.hnust.edu.cn/ggtz/';
|
||||
const link = base + 'index.htm';
|
||||
const response = await got.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('.newsList03 li');
|
||||
|
||||
ctx.state.data = {
|
||||
title: '湖南科技大学艺术学院通知',
|
||||
link: link,
|
||||
description: '湖南科技大学艺术学院通知',
|
||||
image: 'https://i.loli.net/2020/03/24/EAoPzbTsBxeOdjH.jpg',
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
const date = item.find('span').text();
|
||||
const title = item.find('a').text();
|
||||
const url = base + item.find('a').attr('href');
|
||||
|
||||
return {
|
||||
title: title,
|
||||
description: title,
|
||||
pubDate: new Date(date).toUTCString(),
|
||||
link: url,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
34
lib/routes/universities/hnust/computer/index.js
Normal file
34
lib/routes/universities/hnust/computer/index.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const base = 'http://computer.hnust.edu.cn/tzgg/';
|
||||
const link = base + 'index.htm';
|
||||
const response = await got.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('.list01 li');
|
||||
|
||||
ctx.state.data = {
|
||||
title: '湖南科技大学计算机科学与工程学院通知',
|
||||
link: link,
|
||||
description: '湖南科技大学计算机科学与工程学院通知',
|
||||
image: 'https://i.loli.net/2020/03/24/EAoPzbTsBxeOdjH.jpg',
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
const date = item.find('span').text();
|
||||
const title = item.find('a').text();
|
||||
const url = base + item.find('a').attr('href');
|
||||
|
||||
return {
|
||||
title: title,
|
||||
description: title,
|
||||
pubDate: new Date(date).toUTCString(),
|
||||
link: url,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
40
lib/routes/universities/hnust/graduate/index.js
Normal file
40
lib/routes/universities/hnust/graduate/index.js
Normal file
@@ -0,0 +1,40 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
const map = {
|
||||
sszs: 'sszs/',
|
||||
bszs: 'bszs/',
|
||||
};
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const type = ctx.params.type || 'sszs';
|
||||
const base = 'http://graduate.hnust.cn/zsgz/' + (map.hasOwnProperty(type) ? map[type] : map.sszs);
|
||||
const link = `${base}index.htm`;
|
||||
const response = await got.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('.item ul li').slice(4);
|
||||
|
||||
ctx.state.data = {
|
||||
title: '湖南科技大学研究生院招生工作通知',
|
||||
link: link,
|
||||
description: '湖南科技大学研究生院招生工作通知',
|
||||
image: 'https://i.loli.net/2020/03/24/EAoPzbTsBxeOdjH.jpg',
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
const date = item.find('span').text();
|
||||
const title = item.find('a').text();
|
||||
const url = base + item.find('a').attr('href');
|
||||
|
||||
return {
|
||||
title: title,
|
||||
description: title,
|
||||
pubDate: new Date(date).toUTCString(),
|
||||
link: url,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
};
|
||||
};
|
||||
@@ -3,7 +3,7 @@ const cheerio = require('cheerio');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const base = 'http://jwc.hnust.edu.cn/gzzd2_20170827120536008171/jwk3_20170827120536008171/';
|
||||
const link = 'http://jwc.hnust.edu.cn/gzzd2_20170827120536008171/jwk3_20170827120536008171/index.htm';
|
||||
const link = base + 'index.htm';
|
||||
const response = await got.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('.articleList ul li');
|
||||
@@ -12,6 +12,7 @@ module.exports = async (ctx) => {
|
||||
title: '湖南科技大学教务处通知',
|
||||
link: link,
|
||||
description: '湖南科技大学教务处通知',
|
||||
image: 'https://i.loli.net/2020/03/24/EAoPzbTsBxeOdjH.jpg',
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
|
||||
Reference in New Issue
Block a user