SHARE
TWEET

Untitled

a guest Sep 11th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. ##=========================================================================
  4.  
  5. Thread_Number="0";
  6.  
  7. while [ $Thread_Number -lt 11 ]; do
  8.     wget -p https://boards.4channel.org/adv/$Thread_Number
  9.     Thread_Number=$((Thread_Number + 1))
  10. done
  11.  
  12. ##=========================================================================
  13.  
  14. array=(./boards.4channel.org/adv/*);
  15.  
  16. for html in "${array[@]}"; do
  17.     cat $html | grep -o '<a .*href=.*>' | sed -e 's/<a /\n<a /g' | sed -e 's/<a .*href=['"'"'"]//' -e 's/["'"'"'].*$//' -e '/^$/ d' | sort | uniq | grep "thread" | grep -v '[0-9]$' >> URLs.txt
  18. done
  19.  
  20. ##=========================================================================
  21.  
  22. array=( $(cat URLs.txt) )
  23.  
  24. for thread in "${array[@]}"; do
  25.     wget -P pictures -nd -r -l 1 -H -D i.4cdn.org -A png,gif,jpg,jpeg,webm https://boards.4channel.org/adv/$thread
  26. done
  27.  
  28. ##=========================================================================
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