Bionus / imgbrd-grabber

Very customizable imageboard/booru downloader with powerful filenaming features.
https://www.bionus.org/imgbrd-grabber/
Apache License 2.0
2.52k stars 216 forks source link

Artist's commentary token #3062

Open TropicalFish371 opened 11 months ago

TropicalFish371 commented 11 months ago

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?

Bionus commented 10 months ago

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).

TropicalFish371 commented 10 months ago

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.