#!/bin/bash # Rip skins.be URL="http://skins.be" TMP=/home/houghi/tmp/skins.txt #remove and add file for I in $TMP $TMP.pic $TMP.large $TMP.tmp do rm $I touch $I done #Get the links lynx -source $URL|grep " '{print $1}' > $TMP #Rename the spaces sed -e "s/ /%20/g" $TMP > $TMP.tmp mv $TMP.tmp $TMP ################################################################################ ##Delete most lines. Remove this part after test #tail -n 3 $TMP > $TMP.tmp #mv $TMP.tmp $TMP ################################################################################ #Get al the largest Pics URLs for LINE in `cat $TMP` do lynx -source $URL/$LINE|grep -B2 "Today's hotness"|grep skins.be >> $TMP.large done #Find the undelying links awk -Fhref= '{print $2}' $TMP.large > $TMP awk -Ftarget '{print $1}' $TMP > $TMP.large sed -e "s/framepic/kijk_onder/g" $TMP.large > $TMP #get the picture URL for LINE in `cat $TMP` do lynx -source "$LINE"|grep http >> $TMP.pic done #Get the files themselves awk -Fsrc= '{print $2}' $TMP.pic > $TMP.tmp awk -Fonerror '{print $1}' $TMP.tmp > $TMP.large for FILE in `cat $TMP.large` do NAME=`echo $FILE|awk -Fpics/ '{print $2}'` #echo $NAME lynx -dump $FILE >$NAME done