Skip to content

Adds a new --max-downloads option#8453

Open
265866 wants to merge 7391 commits intomikf:masterfrom
265866:feature/max-downloads-arg
Open

Adds a new --max-downloads option#8453
265866 wants to merge 7391 commits intomikf:masterfrom
265866:feature/max-downloads-arg

Conversation

@265866
Copy link
Copy Markdown

@265866 265866 commented Oct 23, 2025

I added a new --max-downloads command line option to limit the number of files downloaded per job

I wanted to make it easier to stop downloads early without writing an external script or interrupting it manually, and I mainly used it for testing new extractors and previewing the first few files from various sources

The default behavior is unchanged when the option is omitted, and I tested it locally to make sure download halts cleanly after reaching the limit

(this is also my first open source contribution, feedback is very welcome!)

mikf and others added 30 commits August 30, 2025 23:01
- provide 'search_tags' metadata for tag searches (mikf#8160)
- support '/archive/tagged/' URLs (mikf#8160)
- use self.groups
- remove __init__ constructors & _init functions
- remove "#category" test results
- only posts and creator posts work
- 'home' and 'list' extractors do nothing atm
- needs 'authorization' header as 'token' config value
  to access locked content
- needs yt-dlp to download 1080p videos
and add 'lists' extractor to collect your account's lists
- fix 'list' URLs
- allow 'id:…' as creator identifier
- simplify API code
- add 'format' option
- handle exceptions
* [vk] Added extractor for VK wall posts
* update
    - fix flake8
    - rename to 'wall-post'
    - remove __init__() / use self.groups
    - simplify 'description' extraction
* add test
* add to docs/supportedsites

---------

Co-authored-by: Mike Fährmann <[email protected]>
… when possible / allowed by VK

- album[name]
- album[count]
- user[name]
- user[nick]
- user[group]
fixes superfluous newlines in --version output
to be SPDX compliant and prevent a 'twine' warning
mikf and others added 27 commits October 15, 2025 19:29
test for 'dt:…' to catch NullDatetime instances,
which inherit from 'datetime.datetime' but are not exactly this class
- use 'datetime.fromisoformat()' when possible (mikf#7671)
- return a datetime-compatible object for invalid datetimes
  (instead of a 'str' value)
remove unnecessary 'util' imports
using None for 'fromlist' is slightly faster than an empty tuple
* Add configuration setting to control newline characters in metadata.
* update docs/configuration
* introduce 'open()' method
* add 'newline' test
@265866
Copy link
Copy Markdown
Author

265866 commented Oct 23, 2025

The only thing I’m not sure about is whether there are any other places where I should update or add documentation

I added the option to gallery_dl/option.py, but I wasn’t sure if there are other files or docs that need changes

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.