Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- uag="Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.5.30729)"
- if [ ! -d $2 ]
- then
- echo Creating $2
- mkdir "$2"
- fi
- echo Entering $2
- cd $2
- postcount=`curl -# "http://youhate.us/index.php?page=dapi&s=post&q=index&tags=$1&limit=1"|pcregrep -o 'posts\ count=\"[^"]+'|sed -e 's/posts\ count=//' -e 's/\"//'`
- rm -f get2.gelbooru.txt
- let "pcount=postcount/1000"
- for ((i=0; i<=$pcount; i++))
- do
- wget "http://youhate.us/index.php?page=dapi&s=post&q=index&tags=$1&limit=1000&pid=$i" -U "$uag" -O - |pcregrep -o -e 'file_url=[^ ]+'|sed -e 's/file_url=//g' -e 's/\"//g' >>get2.gelbooru.txt
- done;
- wget -nc -i get2.gelbooru.txt
Advertisement
Add Comment
Please, Sign In to add comment