AndarielHalo said: I don't mean to bump it, but this is the best and most reliable function for me to use. I tried the Strawberry Perl, but it wouldn't function; the bat would close as soon as I opened it, without doing anything.
Fine, here's a v2.0. Won't work for flash, but whatever.
Granola said: Sometimes it doesn't work (something not being able to use a string as a hash ref).
Yeah, I've been using the program with good success on Sagubooru and Moe Imouto, but I get that error a lot when using it on Danbooru. Sometimes, it gets the error immediately, other times it gets to a certain point before getting the error.
"Can't use string (Couln't GET http://danbooru.donm") as a HASH ref while "strict refs" in use at booru.pl line 83."
That's the full error. I know nothing about writing code so it's pretty meaningless to me. Also, someone mentioned Gelbooru earlier, but I don't think the program works with Gelbooru right now. At least, it never has for me. http://gelbooru.com/index.php?page=forum&s=view&id=81 may be relevant.
Zoom said: ..."Can't use string (Couln't GET http://danbooru.donm") as a HASH ref while "strict refs" in use at booru.pl line 83."
This error is most likely caused by the unregistered user restriction page (Serving to many files, please register for a basic account, etc) which was an addition that came after the last script update.
HatsuneMiku said: This error is most likely caused by the unregistered user restriction page (Serving to many files, please register for a basic account, etc) which was an addition that came after the last script update.
Okay, here's an update. I appear to have "fixed" this (probably not) by deleting the line "use strict" in dan.pm
You can probably get this to work with the other boorus by deleting the "use strict" line in the corresponding .pm file. I have a bad feeling that I've broken something in it but it seems to work and that's what's important.
Still like to find someone who had made this thing in the first place...
Modified booru.pl so that it has an option to make use of the login subroutine found in the booru package. Pretty much a copy paste job taking parts from the booru-upload.pl script.
All credit for the script goes to AoRF seeing as how he was the one who originally wrote the thing and all I did was re-use some code from the other scripts he wrote.
Though the chances of things breaking are relatively low since there are only minor modifications made and none to the supporting modules, there is still the possibility that something might not work for whatever reason.
There is no need to use the SHA1 hash of the password since this does not insert it into the url.
The syntax for use is pretty much the same as with the original edition, what you do is (using the path option as an example):
Granola said: 1. Navigate into the folder containing the tools using command prompt. (cd C:\booru is my location) 2. The syntax you will use is "perl booru.pl -u=USERNAME -p=PASSWORD [booru location you will be using, in this case danbooru] [tag, can be more than one]"
Take a look at the example enclosed. the line "perl booru.pl danbooru hakurei_reimu -f={md5}" will download all images with the hakurei_reimu tag and name them with their md5 hashes. There are more modifiers you can add to make your life easier.
-f= (filename template, I just leave these to {md5}) -l=NUMBER (limits downloads to a certain number) -s=NUMBER (downloads from a post # forward) -r=NUMBER (Downloads based on rating. 1=safe 2=questionable 3=explicit) -p= (sets path to save the files in instead of the current directory. a real lifesaver when you start to put this stuff in batch files. Remember to use quotes if you have any spaces in your path)
Will download all ibkui_fuuko tags that are rated explicit from danbooru and name them with their md5 hashes and place them in the C:\Pictures\Fuuko directory.
Yeah you have to use command prompt. I don't know of any other way besides pictures to explain it.
Use .bat files to make your life easier and automate this whole thing.
is there any way to remove the script from RaisingK so links don't automatically redirect to the image? i'm getting annoyed at having to hit back twice to get to back to the list
takarosie said: lovely! u kno, i think itd be nice to have a team of programers turning that script into nicely interfaced program :).
btw Granola, how do i make the bat file? or rather, can you upload it? i have no idea how to make one :S:S:S:S
Make a text document.
Put your line of code into it, your perl booru.pl danbooru ibuki_fuuko -r=3 -f=${md5} -p="C:\Pictures\Fuuko" or what have you. (DONT FORGET YOUR USERNAME/PASSWORD THING)
Save this text document.
Change the file extension into .bat
Double click dat bat.
Note that you can put multiple lines into the .bat file; this way you can automate all of your downloads.
i dont get it at all this is way to complicated for me is there no easyer way ? if not ill stay the old way of right clik and save image as , im totaly stupid when it comes to scripting,