Advertisement
Guest User

Untitled

a guest
Feb 27th, 2010
774
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.30 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #Choose your Board:
  4. BOARD="wg"
  5.  
  6. echo "Getting all thread-locations from \\$BOARD\\"
  7. for ((i=0; i<=10; i++)) do
  8.    wget -U "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8" -e robots=off -q -O- http://cgi.4chan.org/$BOARD/$i.html | grep -E "<input type=checkbox name=\"[0-9]*\" value=delete>.*filetitle" | sed "s^.*\"\([0-9]*\)\".*^http://cgi.4chan.org/$BOARD/res/\1.html^" >> threadlist
  9.    echo "Threads on page " $i " added to threadlist"
  10. done
  11. echo "Threadlist from \\$BOARD\\ complete"
  12.  
  13. echo "------------------------------------------------------"
  14.  
  15. echo "Getting all image-locations, this can take a while"
  16. wget -U "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8" -e robots=off -q -O- -i threadlist | grep -E "<a href=\"http://images.4chan.org/$BOARD/src/[0-9]+.jpg\" target=\"_blank\">" | sed "s^.*\(http\://images.4chan.org/$BOARD/src/[0-9]*.jpg\).*^\1^" >> imagelist
  17. echo "Imagelist complete"
  18. rm threadlist
  19.  
  20. echo "------------------------------------------------------"
  21.  
  22. echo "Downloading all images from \\$BOARD\\"
  23. wget -U "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8" -e robots=off -np -x -nc -c -i imagelist
  24. rm imagelist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement