Created
February 24, 2014 21:08
-
-
Save ShaneQful/9197131 to your computer and use it in GitHub Desktop.
Checks for lastest episode of LAS and dowloads it if there's a new episode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BEFORE=0 | |
while true | |
do | |
wget http://feeds.feedburner.com/linuxashd -q -O las.feed | |
NOW=$(wc -c las.feed | grep -o -P "\d+") | |
if [ "$NOW" -ne "$BEFORE" ] ; then | |
wget $(grep -o -P "url(\s|\S)+\.mp4" las.feed | head -1 | cut -c 6-) | |
fi | |
BEFORE=$NOW | |
sleep 86400 # Every day | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment