mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
feat(route): IGDB - 学术活动 (#13027)
* feat(route): IGDB - 学术活动 * fix: sort router & use https * fix: sort radar ---------
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const baseUrl = 'https://genetics.cas.cn/jixs/yg/';
|
||||
|
||||
const { data: response } = await got(baseUrl);
|
||||
const $ = cheerio.load(response);
|
||||
|
||||
const items = $('li.row.no-gutters.py-1')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
const a = item.find('a').first();
|
||||
const date = item.find('.col-news-date').first();
|
||||
return {
|
||||
title: a.text(),
|
||||
link: new URL(a.attr('href'), baseUrl).href,
|
||||
pubDate: parseDate(date.text(), 'YYYY.MM.DD'),
|
||||
};
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
title: 'IGDB - 学术活动',
|
||||
link: baseUrl,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
@@ -1,5 +1,6 @@
|
||||
module.exports = {
|
||||
'/cg/:caty?': ['nczitzk'],
|
||||
'/genetics/xshd': ['panyq357'],
|
||||
'/ia/yjs': ['shengmaosu'],
|
||||
'/iee/kydt': ['nczitzk'],
|
||||
'/is/:path+': ['Misaka13514'],
|
||||
|
||||
+16
-8
@@ -9,6 +9,14 @@ module.exports = {
|
||||
target: '/cas/cg/:caty?',
|
||||
},
|
||||
],
|
||||
'www.genetics': [
|
||||
{
|
||||
title: '遗传与生物学研究所 - 学术活动',
|
||||
docs: 'https://docs.rsshub.app/university.html#zhong-guo-ke-xue-yuan',
|
||||
source: ['/jixs/yg', '/'],
|
||||
target: '/cas/genetics/xshd',
|
||||
},
|
||||
],
|
||||
'www.ia': [
|
||||
{
|
||||
title: '自动化所',
|
||||
@@ -17,6 +25,14 @@ module.exports = {
|
||||
target: '/cas/ia/yjs',
|
||||
},
|
||||
],
|
||||
'www.iee': [
|
||||
{
|
||||
title: '电工研究所 科研动态',
|
||||
docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan',
|
||||
source: ['/xwzx/kydt', '/'],
|
||||
target: '/cas/iee/kydt',
|
||||
},
|
||||
],
|
||||
'www.is': [
|
||||
{
|
||||
title: '软件研究所',
|
||||
@@ -37,14 +53,6 @@ module.exports = {
|
||||
target: '/cas/sim/kyjz',
|
||||
},
|
||||
],
|
||||
'www.iee': [
|
||||
{
|
||||
title: '电工研究所 科研动态',
|
||||
docs: 'https://docs.rsshub.app/routes/university#zhong-guo-ke-xue-yuan',
|
||||
source: ['/xwzx/kydt', '/'],
|
||||
target: '/cas/iee/kydt',
|
||||
},
|
||||
],
|
||||
},
|
||||
'mesalab.cn': {
|
||||
_name: '中国科学院',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
module.exports = (router) => {
|
||||
router.get('/cg/:caty?', require('./cg/index'));
|
||||
router.get('/genetics/xshd', require('./genetics/xshd'));
|
||||
router.get('/ia/yjs', require('./ia/yjs'));
|
||||
router.get('/iee/kydt', require('./iee/kydt'));
|
||||
router.get('/is/:path+', require('./is/index'));
|
||||
|
||||
@@ -3842,6 +3842,10 @@ paramsDesc={['公告类型,详见表格']}>
|
||||
|
||||
</Route>
|
||||
|
||||
### 遗传与发育生物学研究所 学术活动 {#zhong-guo-ke-xue-yuan-yi-chuan-yu-fa-yu-sheng-wu-xue-yan-jiu-suo-xue-shu-huo-dong}
|
||||
|
||||
<Route author="panyq357" example="/cas/genetics/xshd" path="/cas/genetics/xshd" radar="1"/>
|
||||
|
||||
## 中国科学院大学 {#zhong-guo-ke-xue-yuan-da-xue}
|
||||
|
||||
### 招聘信息 {#zhong-guo-ke-xue-yuan-da-xue-zhao-pin-xin-xi}
|
||||
|
||||
Reference in New Issue
Block a user