imgbrd-grabber icon indicating copy to clipboard operation
imgbrd-grabber copied to clipboard

Artist's commentary token

Open TropicalFish371 opened this issue 1 year ago • 2 comments

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?

TropicalFish371 avatar Nov 11 '23 02:11 TropicalFish371

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

Bionus avatar Nov 21 '23 17:11 Bionus

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.

TropicalFish371 avatar Nov 24 '23 17:11 TropicalFish371