style: auto format
This commit is contained in:
parent
bc75193bcf
commit
d4d8df16ee
|
|
@ -15,25 +15,27 @@ module.exports = async (ctx) => {
|
|||
},
|
||||
});
|
||||
const $ = cheerio.load(res.data);
|
||||
const itemsArray = $('#result_list table tbody tr').map((index, row) => {
|
||||
const res = $('td', row).eq(0);
|
||||
const resDate = $('td', row).eq(1);
|
||||
const resLink = $('a', res).attr('href');
|
||||
let link;
|
||||
if (resLink.startsWith('../../')) {
|
||||
const parsedUrl = new URL(resLink, xmut);
|
||||
link = parsedUrl.href;
|
||||
} else {
|
||||
link = resLink;
|
||||
}
|
||||
const title = $('a', res).attr('title');
|
||||
const pubDate = parseDate(resDate.text().trim());
|
||||
return {
|
||||
title,
|
||||
link,
|
||||
pubDate
|
||||
};
|
||||
}).get();
|
||||
const itemsArray = $('#result_list table tbody tr')
|
||||
.map((index, row) => {
|
||||
const res = $('td', row).eq(0);
|
||||
const resDate = $('td', row).eq(1);
|
||||
const resLink = $('a', res).attr('href');
|
||||
let link;
|
||||
if (resLink.startsWith('../../')) {
|
||||
const parsedUrl = new URL(resLink, xmut);
|
||||
link = parsedUrl.href;
|
||||
} else {
|
||||
link = resLink;
|
||||
}
|
||||
const title = $('a', res).attr('title');
|
||||
const pubDate = parseDate(resDate.text().trim());
|
||||
return {
|
||||
title,
|
||||
link,
|
||||
pubDate,
|
||||
};
|
||||
})
|
||||
.get();
|
||||
const items = await Promise.all(
|
||||
itemsArray.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ module.exports = {
|
|||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = (router) => {
|
||||
router.get('/jwc/bkjw/:category?', require('./jwc/bkjw.js'));
|
||||
router.get('/jwc/yjjw/:category?', require('./jwc/yjs.js'));
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2507,22 +2507,6 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS
|
|||
|
||||
<Route author="abc1763613206" example="/qdu/jwc" path="/qdu/jwc" radar="1" />
|
||||
|
||||
## 厦门理工大学 {#xia-men-li-gong-da-xue}
|
||||
|
||||
### 教务处 {#xia-men-li-gong-da-xue-jiao-wu-chu}
|
||||
|
||||
<Route author="icecliffs" example="/xmut/jwc/bkjw/jxyx" path="/xmut/jwc/:type/:method" paramsDesc={['系统类型,分为 `bkjw` 本科生教务处, `yjjw` 研究生处', '分类如下表']} >
|
||||
|
||||
| 本科生教务处 | 系统说明 | 研究生处 | 系统说明 |
|
||||
| :------: | :--------: | :--------: | :-------: |
|
||||
| jxyx | 教学运行 | tzgg | 通知公告 |
|
||||
| zhsw | 综合事务 | xwdt | 新闻动态 |
|
||||
| xwgl | 学务管理 | xstj | 学术研究 |
|
||||
| sjjx | 实践教学 | yjsjw | 工作简讯 |
|
||||
| jyjg | 教研教改 | | |
|
||||
|
||||
</Route>
|
||||
|
||||
## 清华大学 {#qing-hua-da-xue}
|
||||
|
||||
### 清华大学校内信息发布平台 {#qing-hua-da-xue-qing-hua-da-xue-xiao-nei-xin-xi-fa-bu-ping-tai}
|
||||
|
|
@ -2557,6 +2541,22 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS
|
|||
|
||||
</Route>
|
||||
|
||||
## 厦门理工大学 {#xia-men-li-gong-da-xue}
|
||||
|
||||
### 教务处 {#xia-men-li-gong-da-xue-jiao-wu-chu}
|
||||
|
||||
<Route author="icecliffs" example="/xmut/jwc/bkjw/jxyx" path="/xmut/jwc/:type/:method" paramsDesc={['系统类型,分为 `bkjw` 本科生教务处, `yjjw` 研究生处', '分类如下表']} >
|
||||
|
||||
| 本科生教务处 | 系统说明 | 研究生处 | 系统说明 |
|
||||
| :------: | :--------: | :--------: | :-------: |
|
||||
| jxyx | 教学运行 | tzgg | 通知公告 |
|
||||
| zhsw | 综合事务 | xwdt | 新闻动态 |
|
||||
| xwgl | 学务管理 | xstj | 学术研究 |
|
||||
| sjjx | 实践教学 | yjsjw | 工作简讯 |
|
||||
| jyjg | 教研教改 | | |
|
||||
|
||||
</Route>
|
||||
|
||||
## 山东大学 {#shan-dong-da-xue}
|
||||
|
||||
### 软件学院通知 {#shan-dong-da-xue-ruan-jian-xue-yuan-tong-zhi}
|
||||
|
|
|
|||
Loading…
Reference in New Issue