Skip to content

feat(route/jlu): add CSW (Software College) jbtz and xbtz notificatio…#22088

Open
Rito-492 wants to merge 1 commit into
DIYgod:masterfrom
Rito-492:master
Open

feat(route/jlu): add CSW (Software College) jbtz and xbtz notificatio…#22088
Rito-492 wants to merge 1 commit into
DIYgod:masterfrom
Rito-492:master

Conversation

@Rito-492

Copy link
Copy Markdown

…n routes

Involved Issue / 该 PR 相关 Issue

Close #

Example for the Proposed Route(s) / 路由地址示例

/jlu/csw/jbtz
/jlu/csw/xbtz

New RSS Route Checklist / 新 RSS 路由检查表

  • New Route / 新的路由
  • Anti-bot or rate limit / 反爬/频率限制
    • If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
  • Date and time / 日期和时间
    • Parsed / 可以解析
    • Correct time zone / 时区正确
  • New package added / 添加了新的包
  • Puppeteer

Note / 说明

…n routes

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions github-actions Bot added route auto: not ready to review Users can't get the RSS feed output according to automated testing results labels May 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Successfully generated as following:

http://localhost:1200/jlu/csw/jbtz - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>FetchError: [GET] &quot;https://csw.jlu.edu.cn/index/jbtz.htm&quot;: &lt;no response&gt; fetch failed
Route: /jlu/csw/:category
Full Route: /jlu/csw/jbtz
Node Version: v24.16.0
Git Hash: dbf2e0c1
http://localhost:1200/jlu/csw/xbtz - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>FetchError: [GET] &quot;https://csw.jlu.edu.cn/index/xbtz.htm&quot;: &lt;no response&gt; fetch failed
Route: /jlu/csw/:category
Full Route: /jlu/csw/xbtz
Node Version: v24.16.0
Git Hash: dbf2e0c1

import got from '@/utils/got';

export const route: Route = {
path: '/csw/:category',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing parameter description for category

source: ['csw.jlu.edu.cn/index/jbtz.htm', 'csw.jlu.edu.cn/index/xbtz.htm'],
},
],
name: '吉林大学软件学院 - 通知公告',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not include namespace name

name: '吉林大学',
in route name.


return {
title: `吉林大学软件学院 - ${titleSuffix}`,
link: baseUrl,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use

const url = `${baseUrl}/index/${category}.htm`;

const el = $(item);
const linkEl = el.find('.title a');
const dateStr = el.find('.time').text().trim();
const title = linkEl.text().trim();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const title = linkEl.text().trim();
const title = linkEl.attr('title');

.text() is truncated.

const dateStr = el.find('.time').text().trim();
const title = linkEl.text().trim();
const rawLink = linkEl.attr('href')!.replaceAll('..', '');
const link = `${baseUrl}${encodeURI(rawLink)}`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think those alphabets, numbers, / and . require encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto: not ready to review Users can't get the RSS feed output according to automated testing results route

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants