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

BUG: 无法抓取 UID 为三位数及以下的用户作品 #220

Open
Ailitonia opened this issue Mar 15, 2023 · 0 comments
Open

BUG: 无法抓取 UID 为三位数及以下的用户作品 #220

Ailitonia opened this issue Mar 15, 2023 · 0 comments

Comments

@Ailitonia
Copy link

  • Browser Type | 浏览器类型:Chrome
  • URL the bug happened | 问题发生的URL:https://www.pixiv.net/users/*
  • Bug will happened every times | Bug每次都会复现: Yes

What did you do | 你做了什么

尝试抓取 UID 为三位数及以下用户的作品

What's expection | 预期的行为是什么

获取用户作品下载链接

What's actually happened | 实际上发生了什么

抓取失败

以 UID=100 为例,尝试抓取用户全部作品,表现为超时且无反馈

image

查看抓取动作发现获取用户作品信息时调用 api 时用户 UID 参数为 null

image

定位问题位于 util.jsgetIDfromURL

https://github.com/FoXZilla/Pxer/blob/8e9644097643322fb09fed01b36f2704ef9ac454/src/app/util.js#L215-L228

第 225 行判断 id 的正则只能捕获四位数及以上的 id

此处于 8513b21 中被引入

考虑到当时 Pixiv 的整体改版,用户作品页面从 https://www.pixiv.net/member_illust.php?id={uid} 变为 https://www.pixiv.net/users/{uid},使得之前版本直接通过 params 获取 id 的方式失效而只能通过正则匹配来实现,但 Pixiv 新版页面 url 中在一般情况下只会存在一个数字作为对应的 id,此处只匹配四位数及以上是否还有必要?

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

No branches or pull requests

1 participant