Skip to content

Commit

Permalink
style: auto format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 19, 2023
1 parent bc75193 commit d4d8df1
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 37 deletions.
40 changes: 21 additions & 19 deletions lib/v2/xmut/jwc/bkjw.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/v2/xmut/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ module.exports = {
},
],
},
};
};
2 changes: 1 addition & 1 deletion lib/v2/xmut/router.js
Original file line number Diff line number Diff line change
@@ -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'));
};
};
32 changes: 16 additions & 16 deletions website/docs/routes/university.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit d4d8df1

Please sign in to comment.