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

Support images with multiple sources #1424

Closed Danimos552 closed 6 years ago

Danimos552 commented 6 years ago

Hello!

I was wondering how can I save the post’s source to a separate log file for further processing? The same way I can store tags, ratings, ids and such in separate files using special tokens. Grabber can already read that information. It can be seen under the “More details” button when you view a post. I'd like to be able to save the source with, for example, a special token like %source%.

Thank you.

Bionus commented 6 years ago

Hello! Have you tried %source%? AFAIK it works.

Danimos552 commented 6 years ago

It worked, thank you!

I actually tried doing %source% in previous Grabber versions, but it did not work back then. I also discovered that using %source:unsafe% will save the source as it is with all slashes and colons.

One more thing. Posts on some websites like e6 have multiple sources, each added after a line break (enter). Grabber can read and save only the first source. How can I retrieve the rest? I would be very grateful for your help.

Bionus commented 6 years ago

I would say it's impossible at the moment, I didn't even know some image/boards had multiple sources. Do you have an example of such image so I can see what I can do to implement it?

Danimos552 commented 6 years ago

From those that I know of, only e6 has this specific format. It supports up to 5 different sources, each separated with a line break (enter) during an upload. You can see them all when you hover your mouse over the first visible source link. There might be other image/boards out there which incorporate similar solutions, too.

These are some example links (all SFW): 5 sources - https://e621.net/post/show/1648832/2018-5_fingers-anthro-bandeau-blonde_hair-breasts- 3 sources - https://e621.net/post/show/1657894/anthro-bathing-canine-casual_nudity-dallamar-drago 2 sources - https://e621.net/post/show/1654845/2010-2_tails-anthro-ayame42612-belly-blush-buizel-

Bionus commented 6 years ago

I pushed an update for the e621 parser, that will be included in the next 6.0.6 release:

image

Simply use the new %sources% token, and you'll be good to go!

For example:

%sources:separator=\n%

Will generate:

https://www.deviantart.com/zummeng/art/ART-TRADE-Napping-763222270
https://inkbunny.net/s/1694775
https://www.sofurry.com/view/1366750
https://zummeng.deviantart.com/
https://orig00.deviantart.net/2ad5/f/2018/252/8/8/_art_trade__napping_by_zummeng-dcmei2m.png

In the external log file.