Skip to content

fix 今日哈工大 哈工大教务处 截取错误#1742

Merged
DIYgod merged 2 commits intoDIYgod:masterfrom
ranpox:master
Mar 13, 2019
Merged

fix 今日哈工大 哈工大教务处 截取错误#1742
DIYgod merged 2 commits intoDIYgod:masterfrom
ranpox:master

Conversation

@ranpox
Copy link
Copy Markdown
Contributor

@ranpox ranpox commented Mar 13, 2019

pr #1674 中的 commit 246b1bc "chore: 大学路由限制条数" 使用splice函数对很多大学的返回条目进行了限制,但是随之产生了bug,这里对哈工大进行了修复,但是其他大学(包括但不限于华中科技大学 山东大学等)仍存在问题。

const $ = cheerio.load(data);
const links = $('.news_list li')
.splice(0, 10)
.slice(10)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

取前 10 个应该是 slice(0, 10)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry for my oversight.

@DIYgod DIYgod merged commit 7c72d91 into DIYgod:master Mar 13, 2019
@DIYgod
Copy link
Copy Markdown
Owner

DIYgod commented Mar 13, 2019

Merged, thanks!

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.

2 participants