Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- SearchArtist=$1
- if [ "$SearchArtist" != "" ]; then
- url=`wget -q -O - -U "Mozilla-lol" "http://www.google.com/search?q=$SearchArtist+wma+OR+mp3+size+%22last+modified%22+%22intitle%3Aindex+of%22+-inurl%3Ahtml+-inurl%3Ahtm+-inurl%3Aphp+-inurl" | perl -e '$mystring = <>; @matches = ($mystring =~ /<a\ href="(.*?)"/g); foreach $x (@matches) {$x =~ s/\/url\?q\=//; $x =~ s/&.*//; $x =~ s/\%2520/\%20/g; print $x, "\n"}' | grep -v "search?q" | grep http`
- songlink=`echo "$url" | sed 's/\ /\n/g' | xargs wget -T 4 -t 1 -O - -i - | perl -e '$mystring = <>; @matches = ($mystring =~ /<a\ href="(.*?)"/gi); foreach $x (@matches) {print $x, "\n"}'`
- echo "URLS"
- echo $url | sed 's/\ /\n/g'
- echo ""
- echo $songlink
- echo ""
- else
- echo ""
- echo "Please check your usage: ./makemusiclist <artistname>"
- echo ""
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement