-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
tags in filename for sankaku or other booru host #94
Comments
You can configure the output filename and directory with the extractor.filename and extractor.directory options. To change the filename format for sankaku to "host_id_rawfilename", you would put something like this in your config file: {
"extractor": {
"sankaku": {
"filename": "{category}_{id}_{tags}.{extension}"
}
}
}
gallery-dl skips downloads for files that already exist and there is also the archive option (also available with the |
oh thank, i will try that :) update : |
The config snippet you posted looks fine and should work. Could you post the whole output when you run gallery-dl with the |
My new config
|
OK, that filename is way too long (670 characters) and there is currently, as also noted in #92, no way to prevent that. I guess too long filenames could just be cut short to fit into the 255 character limit, but a more configurable approach (like string slicing for format string replacement fields) would be nice as well. I'll think of something ... And, by the way: Python, at least on Linux, recognizes long filenames: |
that's what i'm thinking...filename too long because we can't limited how many tags can be add in filename...anyway , thank :) and can it support these format too ?
|
All of these fields are already available, but under different names.
and so on. The exact names depend on the booru board in question, as gallery-dl is just using the API responses without much modification. Take a look at the output with To enable |
to compare with danbooru downloader and other, i think gallery-dl is better |
Yes, but it would be easier to enable this option for all boorus by just setting Concerning filename lengths: you can now (since 8fe9056) slice values in format strings.
It can, but that's not necessary if you want to go past 1000 results / page 50. You don't even need to provide username and password if you want to go past page 25. Being logged in only lets you use more than 5 tags at once and allows you to jump to higher page numbers faster (with |
[danbooru][error] An unexpected error occurred: AttributeError - 'list' object has no attribute 'startswith'. Edit: this is my first post here. am i doing it right? |
You should open a new issue, post the URL in question and, if possible, the complete error output with |
ok i will test it soon :) |
[sankaku][error] Applying filename format string failed: TypeError: string indices must be integers When i'm even not set {tags} ..gallery-dl still only set filename as {id}{created_at}.{extension} instead {tags_artist}{id}{created_at}_.{extension}
so if i input tags have higher than 1000result, it will keep downloading until have nothing to download ? |
You are using version 1.4.2 and not the latest git snapshot. The
Yes, it only stops after downloading all search results, but you can set a custom upper limit with, again, the |
oh nice ty, installed python version and it worked :) i just test host local file and using r:link to batch download, wow it work too :) |
And to quote myself from the other issue: |
thank, so i need update gallery-dl again ? |
Only if you want to use the |
|
Hmm, there is a slim possibility that a HTTP requests "gets stuck" and the client waits forever for a reply from the remote server. Some HTTP requests send by gallery-dl - for some reason - don't have a timeout, so it probably happened with one of those. Fixing this should be easy. In the meantime:
Because it has to get download URL and metadata before it can check if a file has already been downloaded (same as youtube-dl). It doesn't help that Sankaku is incredibly slow itself, so you have to wait 2-5 seconds before each HTTP request (to avoid When using sakaku stuff, you should really use the |
yeah...it's easy to fix with --range you told me
5tags at once, you mean 5 tags combined : ?tags=dynasty_warriors brown_hair china_dress female shoes right ?
sometime it wait 15-20seconds is normal ?
so i need to count downloaded files and compare with tags(totalresult) to know exactly range i need to put in right ? It should have feature to skipped tags once it reach downloaded files (so it just only download newer pictures and stopped once it reach downloaded files if extractor archive option enabled) |
That is not what I meant. I wanted to say "It's easy for me to add a timeout to regular HTTP requests, so it doesn't get stuck anymore" -> 68d6033
Right.
Not really, no. I might be the case that the You can enable verbose output (
Your computer can count them for you:
or the extractor.skip option |
thank you
|
Not going to happen. You should also open a new issue if you want to suggest a new feature. This one here is closed for a reason. |
ok thank |
1, host_id_rawfilename
Can it change to host_id_tags ? Because i don't see option in config file and filename already limited to 255char ?
2, does it have link history to avoid dupplicate downloaded file ? like ripme
3, can it have filename format like below software ?
https://github.com/Nandaka/DanbooruDownloader
thank 👍
The text was updated successfully, but these errors were encountered: