#!/bin/bash # MIRRORURL="http://cdn.media.ccc.de/congress/2014/h264-hd/" URLFILE="videos.url" INDEXFILE="index.html" echo -n "clean up old files ..." if [ -e $INDEXFILE ]; then rm $INDEXFILE fi if [ -e $URLFILE ]; then rm $URLFILE fi echo "done" echo "" echo -n "Downloading new \"index.html\" ..." wget -q $MIRRORURL echo "done" echo "" echo -n "extracting video urls..." grep -i video.png index.html | cut -d"\"" -f8 >> $URLFILE echo "done" echo "" echo "searching for new videos and completing partial downloaded videos..." while read line do wget -c -N $MIRRORURL/$line done <$URLFILE echo "done!"