scripts

random scripts
git clone https://git.parazyd.org/scripts
Log | Files | Refs

chandl (542B)


      1 #!/bin/sh
      2 
      3 case "$1" in
      4 *4chan.org*)
      5 	#imgs='is2.4chan.org'
      6 	imgs='i.4cdn.org'
      7 	;;
      8 *8ch.net*)
      9 	imgs='media.8ch.net'
     10 	;;
     11 *lainchan.org*)
     12 	imgs='.* https:\/\/lainchan.org\/.*\/src\/'
     13 	;;
     14 *arisuchan.jp*)
     15 	imgs='.* https:\/\/arisuchan.jp\/.*/src\/'
     16 	;;
     17 *enrive.org*)
     18 	imgs='enrive.org\/media\/'
     19 	;;
     20 *endchan.xyz*)
     21 	imgs='endchan.xyz\/\.media\/'
     22 	;;
     23 *)
     24 	echo 'Unsupported URL.'
     25 	exit 1
     26 	;;
     27 esac
     28 
     29 lynx -dump "$1" | awk '/^References/,EOF' | awk '/'"$imgs"'/ {print $2}' |
     30 	grep -v player | 
     31 	sort | uniq | while read foo ; do wget -c "$foo" ; done