Donmai

Danbooru downloader script: anibooru

Posted under General

Just want to share with everyone a Python script I've written to batch download images matching tags on danbooru. At the moment I've only tested the script on this site (it's the only one I use). Please visit my github page to download the script as well as file any issues (bugs, feature requests, etc).

I hope it is as helpful to everyone else as it has been for me. Just trying to give back in whatever ways I can.

https://github.com/rcdailey/anibooru

MagicalAsparagus said:

Is it possible to download via metatags like chartags:1?

Looks like it.

url = UrlBuilder('posts.json')
url.addparam('page', self._page)
url.addparam('limit', self._limit)
url.addparam('tags', ' '.join(self._tags))
io = StringIO(url.build().read().decode())
tags_dir = ' '.join(search_tags).replace(':', '-')
1