Skip to content

Instantly share code, notes, and snippets.

@borewicz
Created June 5, 2015 11:26
Show Gist options
  • Save borewicz/3956c48bb777d975f1df to your computer and use it in GitHub Desktop.
Save borewicz/3956c48bb777d975f1df to your computer and use it in GitHub Desktop.
script for downloading mp3s from chomikuj.pl
#!/opt/local/bin/bash
if [ -z "$1" ]
then
echo "No argument supplied"
else
wget -O - "$1" | grep "visibleButtons fileIdContainer" | sed -e 's#.*fileIdContainer" rel="\(.*\)" style.*#http://chomikuj.pl/Audio.ashx?id=\1\&type=2\&tp=mp3#g' | while read line
do
wget --content-disposition $line
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment