Created
August 6, 2014 19:58
-
-
Save Drezil/495293dbc83ab6cde6ef to your computer and use it in GitHub Desktop.
Little Script to download all Harry Potter and the methods of rationality episodes.
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 | |
mkdir -p HPMoR | |
cd HPMoR | |
for episode in `wget -q -O - http://www.hpmorpodcast.com/?page_id=56 | sed -n -e "s/.*http\(.*\)\\.mp3.*/http\1.mp3/p" | uniq` | |
do | |
file="`echo "$episode" | sed -n -e 's/.*\/\([^/].*\)\.mp3.*/\1.mp3/p'`" | |
if [[ -f "$file" ]]; then | |
echo "$file exists. Skipping." | |
else | |
wget "$episode" | |
fi | |
done | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment