Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: complete getting notice info #19

Merged
merged 9 commits into from
Jan 11, 2025

Conversation

SchwarzSail
Copy link
Member

@SchwarzSail SchwarzSail commented Jan 6, 2025

根据页数爬取 https://jwch.fzu.edu.cn/jxtz.htm 中的信息

@SchwarzSail SchwarzSail requested a review from ozline as a code owner January 6, 2025 15:06
@renbaoshuo
Copy link
Member

要不要预留一个分页的信息?

注意教务处的页码顺序是倒序的。

@SchwarzSail
Copy link
Member Author

要不要预留一个分页的信息?

注意教务处的页码顺序是倒序的。

前端要很多通知信息吗,我认为推送当天的通知应该差不多了

@renbaoshuo
Copy link
Member

后续可以考虑做一个列表页面来展示。

@SchwarzSail
Copy link
Member Author

我觉得就像教务处首页那样展示吧,就默认展示出第一页的数据(偷懒)

后续可以考虑做一个列表页面来展示。

@SchwarzSail
Copy link
Member Author

后续可以考虑做一个列表页面来展示。

可以你们前端再确认一下,反正我这边没什么技术难度

@ozline
Copy link
Member

ozline commented Jan 6, 2025

做分页哈,我似乎没有看到分页的地方,这个不止是第一页的

@SchwarzSail
Copy link
Member Author

做分页哈,我似乎没有看到分页的地方,这个不止是第一页的

全部都爬下来吗,有 198 页

@ozline
Copy link
Member

ozline commented Jan 6, 2025

做分页哈,我似乎没有看到分页的地方,这个不止是第一页的

全部都爬下来吗,有 198 页

嗯,只存地址标题日期的话数据量不大,你该做的应该是在 fzuhelper-servre 的一个 syncer,这个 jwch 作为一个 lib 提供的应该是访问某一页全部数据的函数

@SchwarzSail
Copy link
Member Author

做分页哈,我似乎没有看到分页的地方,这个不止是第一页的

全部都爬下来吗,有 198 页

嗯,只存地址标题日期的话数据量不大,你该做的应该是在 fzuhelper-servre 的一个 syncer,这个 jwch 作为一个 lib 提供的应该是访问某一页全部数据的函数

好的老大

@ozline
Copy link
Member

ozline commented Jan 10, 2025

怎么看着这个完工了,完工了吗?

@SchwarzSail
Copy link
Member Author

怎么看着这个完工了,完工了吗?

Copy link
Member

@renbaoshuo renbaoshuo left a comment

Choose a reason for hiding this comment

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

LGTM

@renbaoshuo renbaoshuo requested a review from Copilot January 10, 2025 09:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

notice.go:87

  • Add a check for nil before accessing titleNode to avoid potential panic.
title := strings.TrimSpace(htmlquery.SelectAttr(titleNode, "title"))

jwch_test.go:282

  • The test case 'TestGetNoticesInfo' should validate the actual content of the notices, not just check for errors.
_, err := stu.GetNoticeInfo(&NoticeInfoReq{PageNum: 2})

notice.go Show resolved Hide resolved
@SchwarzSail SchwarzSail merged commit dbb4149 into west2-online:main Jan 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants