mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.34k stars 923 forks source link

feature question: limit on where to start or finish #2599

Closed Mohrlex closed 2 years ago

Mohrlex commented 2 years ago

hello, i hope not to annoy with a dumb question, i know pretty much nothing about code so please be patient, i download quite often from Kemono.party, and the artists get updated from time to time, so i dont want to take hours downloading the same content i already have and end up with a bunch of repeated content, my question is, is possible to place a limit on the code for where to start or where to finish?

for example, a way to order gallery-dl to start download on page 1 of https://kemono.party/patreon/user/20850375 and stop at page 3, since all the content after that is something i already have

mikf commented 2 years ago

so i dont want to take hours downloading the same content i already have

If a file with the same name already exists, gallery-dl will not re-download it and just skip the download. The same happens if a file is already in a --download-archive.

is possible to place a limit on the code for where to start or where to finish?

The general option for that would be --range, but that only limits per file count (e.g. --range 1-100 to only look at and possibly download the first 100 files)

For kemono, you can use the max-posts option to limit the amount of posts downloaded. 25 posts per page, so -o =75 downloads 3 pages worth of posts.

gallery-dl also recognizes the ?o=... parameter in kemono URLs and starts from there, so gallery-dl -o max-posts=75 https://kemono.party/fanbox/user/ID?o=50 would download everything from page 3, 4, and 5.

Then there is also -A, --abort N, that tells gallery-dl to stop when it finds N previously downloaded files in a row.

for example, a way to order gallery-dl to start download on page 1 of https://kemono.party/patreon/user/20850375 and stop at page 3, since all the content after that is something i already have

gallery-dl -o max-posts=75 https://kemono.party/patreon/user/20850375

Mohrlex commented 2 years ago

alright, trying it now, thanks a bunch, this is really helpful and there are various options to approach this, great stuff