-
-
Notifications
You must be signed in to change notification settings - Fork 996
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
Is there a way to create a post-processor config option purely in the command line via some sort of flag command? #2569
Comments
This can be done by declaring a post processor in the global {
"extractor":
{
"#": "..."
},
"postprocessor":
{
"descriptions":
{
"name": "metadata",
"mode": "custom",
"format": "{description}"
}
}
} And you would run it with If you don't like the name "descriptions" here, you can choose whatever other name you want.
|
This is perfect, as long as I use another word than descriptions because for other websites I do have their postprocessors just on 24/7 thanks. |
Your solution doesn't 100% clarify for me the positioning of netrc, it's weird how netrc false isn't inside any {}
is this a valid look for the end of my file? |
Looks like I need to add a comma after "netrc": false
If I want to add the global postprocessor, useful error message though pointed out exactly what mistake I made! |
Nevermind my code above does not work at all. It generates all the correct postprocessor text files, but they all say "None" instead of giving the description I get using the site specific postprocessor. As in the contents of each of the files this generates is
edit1: I tried editing the relevent part of my conf file to
and still all it says is None I got that alternate phrasing from #2319 I think the issue might be something to do with the fact the global postprocessor doesn't have access to my client id and client secret because it's global? Of course the images in question require login to view, and the images are downloading just fine, the descriptions can be viewed without logging in, but the code must check to see if you need to login during the global postprocessor phase and see that there is no client id and give up even though the description itself isn't hidden? If I'm right that means it won't work, and I didn't make a typo and what I'm asking is just too foolish a desire. |
I think you also need to enable the So just add |
well now
Results in not creating the blank text files at all. Still not acquiring the descriptions via this method it seems. I might just be misunderstanding something though. If I'm not, though, I think it must be an issue relating to login? An easier solution might be to just maintain two conf files in two locations and specify which I want in the cli, but the problem with that is that as I make later edits/updates/fixes to one conf file I'll forget to make the same changes in the other one. |
By default a post processor does not run when the corresponding image was already downloaded and its download gets skipped. Either use |
It's flawless now, thanks! I was misunderstanding a lot. |
For anyone in the future (including me if I get a new computer.) This is how my conf file ends.
Then I run this command.
It does exactly what I imagined it could before I made 6 mistakes and you saved me. |
No, I was just making an assumption - it not writing any descriptions because it skipped the file download, because it worked fine on my end: $ gallery-dl -P descriptions -o metadata=1 https://www.deviantart.com/muns11/art/Forest-magician-915156004
/tmp/deviantart/Muns11/deviantart_915156004_Forest magician.jpg
$ cat deviantart/Muns11/deviantart_915156004_Forest\ magician.jpg.txt
<div><span> Painting was made on commission, check my info below: <br /></span><a href="https://www.deviantart.com/muns11/art/Commissions-OPEN-906268162">Commissions [OPEN]</a><br /></div> |
Oh that's interesting, because that's not correct on my end. Every single time I reported it not working I downloaded the new file, because every time I did the test I deleted it. And my archive file. Then again half my mistakes were typos, and maybe the one time I had it right, I forgot the deleting step, but I'd deleted those files so many times I just didn't realize I deleted them all 6 times instead of 7 :D That's the best fit theory for my inaccurate observation. Thanks again for all the help. |
The usage case is for downloading stories that are written as descriptions of an image instead of as stories on deviantart. This is very rare and I'd want to just manually save them using this post-processor:
#189 (comment)
I wouldn't want that option on most of the time though because I don't want 99.99% of descriptions from deviantart.
I first mentioned this desire here:
#189 (comment)
but I realized maybe a reply to a closed issue wouldn't get noticed? So I created this, sorry if this is a silly and niche use case that I shouldn't be asking about.
The text was updated successfully, but these errors were encountered: