Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #creates a list of the front page videos
- curl -s http://www.liveleak.com/ | grep 'width="120"' > menu.txt
- sed -i 's/<a href="//g' menu.txt
- sed -i 's/title=/\n&/g' menu.txt
- sed -i s/'"><img'[^@]*$// menu.txt
- sed -i 's/title="/# /g' menu.txt
- sed -i 's#"/></a>##g' menu.txt
- sed -i "s/^[ \t]*//" menu.txt
- awk 'NR%2{printf $0" ";next;}1' menu.txt > menulist.txt
- rm menu.txt
- sed -i 's/ /_/g' menulist.txt
- sed -i 's/_#/#/g' menulist.txt
- #creates the select menu of the videos
- p=`cat menulist.txt`
- rm menulist.txt
- select CHOICE in $p
- do
- #greps the mp4 url from the selected video and plays it with vlc
- curl -s "$CHOICE" | grep 'file: "http://edge.liveleak.com' > file.txt
- sed -i 's/ file: "//g' file.txt
- sed -i 's/",//g' file.txt
- file=`cat file.txt`
- rm file.txt
- vlc --play-and-exit $file > /dev/null 2>&1
- done
Add Comment
Please, Sign In to add comment