From 496e98a4cfc709aa25b634acee06ac4cb32c7b6f Mon Sep 17 00:00:00 2001 From: wanlala <43746907+wanlala@users.noreply.github.com> Date: Fri, 1 May 2026 15:29:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(route/nuaa):=20=E4=BF=AE=E5=A4=8DNUAA?= =?UTF-8?q?=E6=95=99=E5=8A=A1=E5=A4=84DOM=E5=85=83=E7=B4=A0=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=20(#21879)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Involved Issue / 该 PR 相关 Issue ## Example for the Proposed Route(s) / 路由地址示例 ``` /nuaa/jwc/tzgg ``` ## New RSS Route Checklist / 新 RSS 路由检查表 - [ ] New Route / 新的路由 - [ ] Follows [Script Standard](https://docs.rsshub.app/joinus/advanced/script-standard) / 跟随 [路由规范](https://docs.rsshub.app/zh/joinus/advanced/script-standard) - [x] Documentation / 文档说明 - [x] Full text / 全文获取 - [ ] Use cache / 使用缓存 - [x] Anti-bot or rate limit / 反爬/频率限制 - [ ] If yes, do your code reflect this sign? / 如果有, 是否有对应的措施? - [ ] [Date and time](https://docs.rsshub.app/joinus/advanced/pub-date) / [日期和时间](https://docs.rsshub.app/zh/joinus/advanced/pub-date) - [ ] Parsed / 可以解析 - [ ] Correct time zone / 时区正确 - [ ] New package added / 添加了新的包 - [ ] `Puppeteer` ## Note / 说明 更新了 DOM 元素的解析,适配了新的南航教务处页面样式 --- lib/routes/nuaa/jwc/jwc.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/routes/nuaa/jwc/jwc.ts b/lib/routes/nuaa/jwc/jwc.ts index afc8b4ef2..e60b7fc5e 100644 --- a/lib/routes/nuaa/jwc/jwc.ts +++ b/lib/routes/nuaa/jwc/jwc.ts @@ -7,7 +7,7 @@ import { parseDate } from '@/utils/parse-date'; import getCookie from '../utils/pypasswaf'; -const host = 'http://aao.nuaa.edu.cn/'; +const host = 'https://aao.nuaa.edu.cn/'; const map = new Map([ ['tzgg', { title: '通知公告 | 南京航空航天大学教务处', suffix: '8222/list.htm' }], @@ -53,14 +53,14 @@ async function handler(ctx) { const response = await got(link, gotConfig); const $ = load(response.data); - const list = $('#wp_news_w8 ul li') + const list = $('#news_list .news_ul .p-list-item a') .slice(0, 10) .toArray() .map((element) => { const info = { - title: $(element).find('a').text(), - link: $(element).find('a').attr('href'), - date: $(element).find('span').text(), + title: $(element).find('.text .title').text(), + link: $(element).attr('href'), + date: $(element).find('.date em').text() + '-' + $(element).find('.date span').text(), }; return info; });