Danbooru Batch Downloader Bookmarklet

Allows batch downloading from danbooru sites. Though this bookmarklet just prepares the actual image URLs. You still need a download manager to download files concurrently. I recommend using the DownThemAll plugin for firefox to download them.

Source (snipt.org)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3A%20%28function%28%29%20%7B%20%20%20var%20images%20%3D%20document.getElementsByClassName%28%22thumb%22%29%3B%20var%20sidebar%20%3D%20document.getElementsByClassName%28%22sidebar%22%29%5B0%5D%3B%20var%20selection%20%3D%20%5B%5D%3B%20var%20postID%20%3D%20%5B%5D%3B%20var%20links_html%20%3D%20%22%22%3B%20var%20n%20%3D%20images.length%3B%20%20%20function%20createButton%28value%29%20%7B%20%09var%20btn%20%3D%20document.createElement%28%22input%22%29%3B%09%20%09btn.type%20%3D%20%22button%22%3B%20%09btn.value%20%3D%20value%3B%20%09return%20btn%3B%20%7D%20%20%20function%20buildLinks%28html%29%20%7B%20%09var%20links%20%3D%20window.open%28%29%3B%20%09links.document.write%28html%29%3B%20%7D%20%20%20for%28var%20i%20%3D%200%3B%20i%20%3C%20n%3B%20i++%29%20%7B%20%09selection%5Bi%5D%20%3D%20document.createElement%28%22input%22%29%3B%20%09selection%5Bi%5D.type%20%3D%20%22checkbox%22%3B%20%09images%5Bi%5D.appendChild%28selection%5Bi%5D%29%3B%20%09postID%5Bi%5D%20%3D%20parseInt%28images%5Bi%5D.parentNode.id.substring%281%29%2C%2010%29%20%7C%7C%20%09%09%20%20%20%20parseInt%28images%5Bi%5D.id.substring%281%29%2C%2010%29%3B%20%7D%20%20%20var%20download_selected%20%3D%20createButton%28%22Download%20Selected%22%29%3B%20download_selected.onclick%20%3D%20function%28event%29%20%7B%20%09n%20%3D%20images.length%3B%20%09links_html%20%3D%20%22%22%3B%20%09for%28var%20i%20%3D%200%3B%20i%20%3C%20n%3B%20i++%29%20%7B%20%09%09if%28selection%5Bi%5D.checked%29%20%7B%20%09%09%09var%20imgsrc%20%3D%20Post.posts.get%28postID%5Bi%5D%29.sample_url%3B%20%09%09%09links_html%20+%3D%20%22%3Ca%20href%3D%22%20+%20imgsrc%20+%20%22%3E%22%20+%20imgsrc%20+%20%22%3C/a%3E%3Cbr%20/%3E%22%3B%20%09%09%7D%20%09%7D%20%09buildLinks%28links_html%29%3B%20%7D%3B%20%20%20var%20download_all%20%3D%20createButton%28%22Download%20All%22%29%3B%20download_all.onclick%20%3D%20function%28event%29%20%7B%20%09n%20%3D%20images.length%3B%09%20%09links_html%20%3D%20%22%22%3B%20%09for%28var%20i%20%3D%200%3B%20i%20%3C%20n%3B%20i++%29%20%7B%20%09%09var%20imgsrc%20%3D%20Post.posts.get%28postID%5Bi%5D%29.sample_url%3B%20%09%09links_html%20+%3D%20%22%3Ca%20href%3D%22%20+%20imgsrc%20+%20%22%3E%22%20+%20imgsrc%20+%20%22%3C/a%3E%3Cbr%20/%3E%22%3B%20%09%7D%20%09buildLinks%28links_html%29%3B%20%7D%3B%20%20%20var%20buttons%20%3D%20document.createElement%28%22center%22%29%3B%20buttons.appendChild%28download_selected%29%3B%20buttons.appendChild%28download_all%29%3B%20sidebar.appendChild%28buttons%29%3B%20%7D%29%28%29%3B%20//%20NULLTERM%20%5B%5C0%5D


Rate it:


Tags:

Comments

Comments so far. Add yours.

BackslashZr0

Note that these only work on imageboards that use danbooru. I've tested this bookmarklet on the following sites, though I would expect it to work on all versions of danbooru:
http://danbooru.donmai.us/
http://konachan.com/
http://moe.imouto.org/
http://chan.sankakucomplex.com/


ad

is it possible to add "check all" option?


anonymous

Would you mind making this work with Gelbooru?
Only imageboard that doesn't seem to work.


anonymous

It's a nice idea, but the script only downloads the smaller "sample" images for resized images.