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

Search Illust Page #21

Closed
shinzo9428 opened this issue Feb 5, 2022 · 1 comment
Closed

Search Illust Page #21

shinzo9428 opened this issue Feb 5, 2022 · 1 comment

Comments

@shinzo9428
Copy link

Search Illusts only shows the first page and 30 results

@Moebits
Copy link
Owner

Moebits commented Feb 5, 2022

Subsequent page results are stored in the nextURL property and you can use the utility util.multiCall() to iterate automatically until the provided limit of results, or all results if no limit is provided

Example:

let limit = 100
let illusts = await pixiv.search.illusts({word: "query"})
if (pixiv.search.nextURL) illusts = [...illusts, ...await pixiv.util.multiCall({next_url: pixiv.search.nextURL, illusts}, limit)]

@Moebits Moebits closed this as completed Feb 5, 2022
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

2 participants