style: auto format
This commit is contained in:
parent
5ed4cda42d
commit
2d5ff19bf2
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
module.exports = function (router) {
|
||||
router.get('/jwc', require('./jwc'));
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue