daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Dec 16th, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. if which puf >/dev/null; then
  3.     echo "- system looks fine, let's start -"
  4. else
  5.     echo "*******************************************"
  6.     echo "HOLY DOGSHIT YOU DON'T HAVE PUF, DO YOU ?!"
  7.     echo '"sudo apt-get install puf", slimy bastard !'
  8.     echo "   --- script ending in 10 seconds ---"
  9.     echo "*******************************************"
  10.     sleep 10
  11.     exit
  12. fi
  13. echo ""
  14. read -p "Which 4chan thread ? Paste the URL ! " thread
  15. echo ""
  16. echo "# Let me download the thread and extract its image links."
  17. wget --quiet "$thread" -O - | grep -o '<a href="//images.4chan.org[^"]*' | sed 's/<a href="\/\//http:\/\//' >> imagelist
  18. echo ""
  19. echo "# Allright boy, let's download the images ! This will take some time."
  20. echo ""
  21. foldername=`echo $thread | awk -F '4chan.org' '{print $2}' | sed 's/\//_/g'`
  22. mkdir -p "img$foldername"
  23. puf -P "img$foldername" -i imagelist
  24. rm imagelist
  25. echo ""
  26. echo "---------------------------------------"
  27. echo "Done. You'll find your stuff in the folder img$foldername :)"
  28. echo "5 seconds before exit. Have a nice day !"
  29. sleep 5
  30. exit
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top