imgbrd-grabber
imgbrd-grabber copied to clipboard
Artist's commentary token
Hi
Is there a token for the artist's commentary? I mean the one that's displayed below the image on Danbooru (and probably some other boorus), like here: https://danbooru.donmai.us/posts/4000000.
I have my own Danbooru instance and save images to it. Thanks to the ready script, it's pretty easy. Alas, it doesn't save commentary. I could extend script to do so, but searching through docs and source code I haven't found a token for it. Any suggestions, please?
Unfortunately, loading the artist commentary on Danbooru isn't as easy as loading other information.
In the case of your example, Grabber loads the information from: https://danbooru.donmai.us/posts/4000000.json
But while you'll find almost everything there, you won't find the commentary there. It's actually instead present here: https://danbooru.donmai.us/posts/4000000/artist_commentary.json
Loading it from Grabber would mean an additional HTTP call for every single image. It's also a pretty specific thing, as other tokens don't need to do that. An alternative could be to switch to HTML parsing of the details page, but then there's other issues with that (less performant, and less reliable).
How about make this additional HTTP call an optional thing?
This can be a checkbox in settings. Only when it is enabled, a commentary is requested per image.
Also, an extra button for requesting commentary can be added in image preview window, so that an additional call is requested only when it is needed.