metalx1000

Generates and plays Random NIN Streaming Playlist

Sep 19th, 2014
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. #!/bin/bash
  2. #still need to check if IP changes on this service
  3.  
  4. if [ -f "/usr/bin/mplayer" ];
  5. then
  6.     echo "Mplayer is installed"
  7. else
  8.     echo "Installing Mplayer"
  9.     sudo apt-get install mplayer -y
  10. fi
  11.  
  12. rm /tmp/m.lst
  13. echo "Getting MP3 List"
  14. for i in {1..10}
  15. do
  16.     wget -q "http://www.myfreemp3.cc/mp3/nine+inch+nails?page=$i" -O- >> /tmp/m.lst
  17. done
  18.  
  19. echo "Creating Playlist"
  20.     sed 's/data-aid/\n/g' /tmp/m.lst|grep "^="|cut -d\" -f2|shuf|\
  21.     while read line;
  22.     do
  23.         echo "http://94.102.56.238/play.php?q=${line}dcaa_"
  24.     done > /tmp/nin.lst
  25.  
  26. mplayer -shuffle -playlist /tmp/nin.lst
Add Comment
Please, Sign In to add comment