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

implement max-rank for pixiv #1558

Merged
merged 2 commits into from
May 24, 2021
Merged

implement max-rank for pixiv #1558

merged 2 commits into from
May 24, 2021

Conversation

thatfuckingbird
Copy link
Contributor

I want to download the top N posts from a ranking page where N is configurable. I did not find a way to do this (image-range is not good since a pixiv post may have many images). This PR adds an option to achieve this.

@mikf
Copy link
Owner

mikf commented May 22, 2021

The old problem of gallery-dl handling everything per-file instead of per-post ...

I think your solution can (and should) be applied more generally, so it can also be used for search results etc. I propose renaming this option to max-posts and using it for the main loop in items():

        works = self.works()
        if self.max_posts:
            works = itertools.islice(works, self.max_posts)
        for work in works:

@thatfuckingbird
Copy link
Contributor Author

The old problem of gallery-dl handling everything per-file instead of per-post ...

I think your solution can (and should) be applied more generally, so it can also be used for search results etc. I propose renaming this option to max-posts and using it for the main loop in items():

        works = self.works()
        if self.max_posts:
            works = itertools.islice(works, self.max_posts)
        for work in works:

done!

@mikf
Copy link
Owner

mikf commented May 24, 2021

Thank you!

@mikf mikf merged commit e6811c7 into mikf:master May 24, 2021
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