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 Dec 7, 2023
1 parent 5ed4cda commit 2d5ff19
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
16 changes: 8 additions & 8 deletions lib/v2/ncu/jwc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ const cheerio = require('cheerio'); // 可以使用类似 jQuery 的 API HTML
const { parseDate } = require('@/utils/parse-date');

module.exports = async (ctx) => {
const baseUrl = "https://jwc.ncu.edu.cn";
const baseUrl = 'https://jwc.ncu.edu.cn';
const response = await got(baseUrl);
const $ = cheerio.load(response.body);

const list = $(".box3 .inner ul.img-list li");
const list = $('.box3 .inner ul.img-list li');

ctx.state.data = {
title: "南昌大学教务处",
title: '南昌大学教务处',
link: baseUrl,
description: "南昌大学教务处",
description: '南昌大学教务处',
item:
list &&
list.toArray().map((item) => {
const el = $(item);
const linkEl = el.find("a");
const date = el.text().split("】")[0].replace("【", "").trim();
const title = linkEl.attr("title");
const link = `${baseUrl}/${linkEl.attr("href")}`;
const linkEl = el.find('a');
const date = el.text().split('】')[0].replace('【', '').trim();
const title = linkEl.attr('title');
const link = `${baseUrl}/${linkEl.attr('href')}`;
const month = date.slice(0, 2);

return {
Expand Down
1 change: 0 additions & 1 deletion lib/v2/ncu/router.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
module.exports = function (router) {
router.get('/jwc', require('./jwc'));

};
2 changes: 1 addition & 1 deletion website/docs/routes/university.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2110,7 +2110,7 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS

## 南昌大学 {#nan-chang-da-xue}

### 教务通知 {#nan-chang-da-xue--jiao-wu-tong-zhi}
### 教务通知 {#nan-chang-da-xue-jiao-wu-tong-zhi}

<Route author="ywh555hhh" example="/ncu/jwc" path="/ncu/jwc" radar="1" />

Expand Down

0 comments on commit 2d5ff19

Please sign in to comment.