mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 14:40:23 +08:00
Merge branch 'master' of https://github.com/RayHY/RSSHub into RayHY-master
This commit is contained in:
4
docs/README.md
Normal file → Executable file
4
docs/README.md
Normal file → Executable file
@@ -1845,7 +1845,7 @@ https://rsshub.app/**nuist**/`bulletin` 或 https://rsshub.app/**nuist**/`bullet
|
||||
|
||||
### 华中科技大学
|
||||
|
||||
<route name="自动化学院通知" author="jinxiapu" example="/hust/auto/notice/0" path="/universities/hust/auto/notice/:type?" :paramsDesc="['分区 type, 默认为最新通知 可在网页 HTML中找到']">
|
||||
<route name="人工智能和自动化学院通知" author="RayHY" example="/hust/aia/notice/0" path="/universities/hust/aia/notice/:type?" :paramsDesc="['分区 type, 默认为最新通知 可在网页 HTML中找到']">
|
||||
|
||||
| 最新 | 行政 | 人事 | 科研 | 讲座 | 本科生 | 研究生 | 学工 |
|
||||
| ---- | ---- | ---- | ---- | ---- | ------ | ------ | ---- |
|
||||
@@ -1853,7 +1853,7 @@ https://rsshub.app/**nuist**/`bulletin` 或 https://rsshub.app/**nuist**/`bullet
|
||||
|
||||
</route>
|
||||
|
||||
<route name="自动化学院新闻" author="jinxiapu" example="/hust/auto/news" path="/universities/hust/auto/news" />
|
||||
<route name="人工智能和自动化学院新闻" author="RayHY" example="/hust/aia/news" path="/universities/hust/aia/news" />
|
||||
|
||||
### 山东大学
|
||||
|
||||
|
||||
6
lib/router.js
Normal file → Executable file
6
lib/router.js
Normal file → Executable file
@@ -669,8 +669,10 @@ router.get('/kmust/job/careers/:type?', require('./routes/universities/kmust/job
|
||||
router.get('/kmust/job/jobfairs', require('./routes/universities/kmust/job/jobfairs'));
|
||||
|
||||
// 华中科技大学
|
||||
router.get('/hust/auto/notice/:type?', require('./routes/universities/hust/auto/notice'));
|
||||
router.get('/hust/auto/news/', require('./routes/universities/hust/auto/news'));
|
||||
router.get('/hust/auto/notice/:type?', require('./routes/universities/hust/aia/notice'));
|
||||
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('/sdu/grad/academic', require('./routes/universities/sdu/grad/academic'));
|
||||
|
||||
8
lib/routes/universities/hust/auto/news.js → lib/routes/universities/hust/aia/news.js
Normal file → Executable file
8
lib/routes/universities/hust/auto/news.js → lib/routes/universities/hust/aia/news.js
Normal file → Executable file
@@ -3,15 +3,15 @@ const cheerio = require('cheerio');
|
||||
const url = require('url').resolve;
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const link = 'http://auto.hust.edu.cn/yxxw.htm';
|
||||
const link = 'http://aia.hust.edu.cn/yxxw.htm';
|
||||
const response = await axios.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('.N02_list li dl').splice(0, 10);
|
||||
|
||||
ctx.state.data = {
|
||||
title: '华科自动化学院新闻',
|
||||
title: '华科人工智能和自动化学院新闻',
|
||||
link: link,
|
||||
description: '华科自动化学院新闻',
|
||||
description: '华科人工智能和自动化学院新闻',
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
@@ -24,7 +24,7 @@ module.exports = async (ctx) => {
|
||||
const year_month = item.find('.N02_list_Icon').text();
|
||||
return {
|
||||
title: item.find('h4 a').text(),
|
||||
description: item.find('dd p').text() || '华科自动化学院新闻',
|
||||
description: item.find('dd p').text() || '华科人工智能和自动化学院新闻',
|
||||
pubDate: new Date(year_month + ' ' + day).toUTCString(),
|
||||
link: url(link, item.find('h4 a').attr('href')),
|
||||
};
|
||||
8
lib/routes/universities/hust/auto/notice.js → lib/routes/universities/hust/aia/notice.js
Normal file → Executable file
8
lib/routes/universities/hust/auto/notice.js → lib/routes/universities/hust/aia/notice.js
Normal file → Executable file
@@ -6,7 +6,7 @@ const typelist = ['最新', '行政', '人事', '科研', '讲座', '本科生',
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const type = parseInt(ctx.params.type) || 0;
|
||||
const link = 'http://auto.hust.edu.cn/';
|
||||
const link = 'http://aia.hust.edu.cn/';
|
||||
const response = await axios.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
const list = $('.m_content .m_con')
|
||||
@@ -15,9 +15,9 @@ module.exports = async (ctx) => {
|
||||
.splice(0, 10);
|
||||
|
||||
ctx.state.data = {
|
||||
title: `华科自动化学院${typelist[type]}通知`,
|
||||
title: `华科人工智能和自动化学院${typelist[type]}通知`,
|
||||
link: link,
|
||||
description: `华科自动化学院${typelist[type]}通知`,
|
||||
description: `华科人工智能和自动化学院${typelist[type]}通知`,
|
||||
item:
|
||||
list &&
|
||||
list
|
||||
@@ -30,7 +30,7 @@ module.exports = async (ctx) => {
|
||||
const year_month = item.find('.N02_list_Icon').text();
|
||||
return {
|
||||
title: item.find('h4 a').text(),
|
||||
description: item.find('dd p').text() || `华科自动化学院${typelist[type]}通知`,
|
||||
description: item.find('dd p').text() || `华科人工智能和自动化学院${typelist[type]}通知`,
|
||||
pubDate: new Date(year_month + ' ' + day).toUTCString(),
|
||||
link: url(link, item.find('h4 a').attr('href')),
|
||||
};
|
||||
Reference in New Issue
Block a user