We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我在尝试使用aapi时,为其自定义了一个方法:
def illust_bookmark_users( self, illust_id: int | str, offset: int | str | None = None, req_auth: bool = True ) -> ParsedJson: url = "%s/v1/illust/bookmark/users" % self.hosts params = { "illust_id": illust_id, } if offset: params["offset"] = offset r = self.no_auth_requests_call("GET", url, params=params, req_auth=req_auth) return self.parse_result(r)
用于获取谁收藏了某个插画。 然而在使用过程中,遇到了一个问题:offset不能超过5000,一旦超过则api就会返回错误信息:
_ACCESS_TOKEN = "..." _REFRESH_TOKEN = "..." from pixivpy3 import * api = AppPixivAPI() api.set_auth(access_token = _ACCESS_TOKEN,refresh_token=_REFRESH_TOKEN) print(api.illust_bookmark_users(116190229, offset=4980)) # OK print(api.illust_bookmark_users(116190229, offset=5010)) # {'error': {'user_message': 'Invalid request.', 'message': '', 'reason': '', 'user_message_details': {}}}
请问有什么方法能绕过此限制?
The text was updated successfully, but these errors were encountered:
只使用aapi很难绕过此限制,除非能找到服务器程序的漏洞。你只能考虑使用其他平台的API了,如模拟网页浏览器的请求。
Sorry, something went wrong.
嗯,App-API是针对手机设计的。如果你需要抓取全部内容,可能考虑网页端用Webdriver获取更容易,对应接口是:
GET /users/{user_id}/bookmarks/artworks?p={页码}
No branches or pull requests
我在尝试使用aapi时,为其自定义了一个方法:
用于获取谁收藏了某个插画。
然而在使用过程中,遇到了一个问题:offset不能超过5000,一旦超过则api就会返回错误信息:
请问有什么方法能绕过此限制?
The text was updated successfully, but these errors were encountered: