fix(route): 中山大学计算机学院 (#8333)

* fix(route): 中山大学计算机学院

* docs: fix path and paramsDesc

Co-authored-by: TonyRL <TonyRL@users.noreply.github.com>
This commit is contained in:
Ethan Shen
2022-02-25 11:22:51 +08:00
committed by GitHub
parent 76b3bba258
commit 8b0deaa7a6
6 changed files with 24 additions and 5 deletions

View File

@@ -2868,4 +2868,4 @@ type 列表:
### 数据科学与计算机学院动态
<Route author="Neutrino3316 MegrezZhu" example="/sysu/sdcs" path="/sysu/sdcs" />
<Route author="Neutrino3316 MegrezZhu nczitzk" example="/sysu/cse" path="/sysu/cse"/>

View File

@@ -1146,7 +1146,7 @@ router.get('/nautilus/topic/:tid', lazyloadRouteHandler('./routes/nautilus/topic
// router.get('/javbus/western/series/:seriesid', lazyloadRouteHandler('./routes/javbus/western/series'));
// 中山大学
router.get('/sysu/sdcs', lazyloadRouteHandler('./routes/universities/sysu/sdcs'));
// router.get('/sysu/cse', lazyloadRouteHandler('./routes/universities/sysu/cse'));
// 動畫瘋
router.get('/anigamer/new_anime', lazyloadRouteHandler('./routes/anigamer/new_anime'));

View File

@@ -4,9 +4,9 @@ const cheerio = require('cheerio');
module.exports = async (ctx) => {
const response = await got({
method: 'get',
url: 'http://sdcs.sysu.edu.cn/',
url: 'http://cse.sysu.edu.cn/',
headers: {
Referer: `http://sdcs.sysu.edu.cn/`,
Referer: `http://cse.sysu.edu.cn/`,
},
});
const $ = cheerio.load(response.data);
@@ -95,7 +95,7 @@ module.exports = async (ctx) => {
ctx.state.data = {
title: `中山大学 - 数据科学与计算机学院`,
link: `http://sdcs.sysu.edu.cn`,
link: `http://cse.sysu.edu.cn`,
description: `中山大学 - 数据科学与计算机学院`,
language: `zh-cn`,
item: item_data,

View File

@@ -0,0 +1,3 @@
module.exports = {
'/sysu/cse': ['Neutrino3316', 'MegrezZhu', 'nczitzk'],
};

13
lib/v2/sysu/radar.js Normal file
View File

@@ -0,0 +1,13 @@
module.exports = {
'sysu.edu.cn': {
_name: '中山大学',
cse: [
{
title: '计算机学院(软件学院)',
docs: 'https://docs.rsshub.app/universities.html#zhong-shan-da-xue-ji-suan-ji-xue-yuan',
source: ['/'],
target: '/sysu/cse',
},
],
},
};

3
lib/v2/sysu/router.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = function (router) {
router.get('/cse', require('./cse'));
};