#!/bin/bash
printf 'Что будем смотреть? '
read DISTR
case $DISTR in
glaz|g)
CHANNEL=$(select OS in "tnt" "ntv" "sts" "rossiya-1" "pyatyi-kanal" "zvezda" "perec" "pyatnica"
do
echo
echo "http://www.glaz.tv/online-tv/$OS"
echo
break
done)
wget -qO- $CHANNEL | grep -o 'src="http://www.glaz.tv/uppod-hls2.swf?file=.*"></object></div><div id="lx_preroll"></div>' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' |
grep -o '".*"' | awk '{print "chromium-browser --app="$0}' | sh
;;
chas|c)
PAG=$(wget -qO- www.chas.tv | grep -o '/channel/.*">' | sed 's,/channel/,,g' | sed 's,">,,g' | sed 's/\(.\)/\u\1/' )
CHANELL=$(select var in $PAG
do
echo "http://chas.tv/channel/$var"
break
done)
PLAYER=$(wget -qO- $CHANELL | grep -o 'file:.*"' | grep -o 'http:.*"' |sed 's,",,g')
vlc $PLAYER > /dev/null 2>&1
;;
*)
echo "Я такого не знаю."
exit 0
;;
esac