Тэк (piyavking) wrote,
Тэк
piyavking

Скрипт парсит фанат.тв, и грабит прямые линки на потоки в плеер.

---------------------------------------------------------------------------------------
#!/bin/bash
if [ "$1" != "" ];then
mpv `wget -O - 'http://fanat.tv/channels/'$1 | grep playlist | awk -F'"' '{print $2}'  | sed -e s/playlist/chunks/g`
else
echo '#EXTM3U' > ~/tmp/tv.m3u
while read line;do
chname="${line##*/}"
churl=`wget -O - 'http://fanat.tv/channels/'$chname | grep playlist | awk -F'"' '{print $2}'  | sed -e s/playlist/chunks/g`
if [ ! "$churl" == '' ];then
echo '#EXTINF:-1,'$chname >> ~/tmp/tv.m3u
echo $churl >> ~/tmp/tv.m3u
fi
done <<< "$(wget -O - fanat.tv/channels | sed -e 's/\"/\n/g' | grep 'channels/' | sort | uniq)"
smplayer ~/tmp/tv.m3u
fi
---------------------------------------------------------------------------------------

эбаут 200 кананалов, есть нерабочие, но их сравнительно немного. кто будет лузать - черканите пару строк
Tags: #extinf, #extm3u, тематика этого блога
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments