source: titan/mediathek/localparser_secret/sportsondemand.sh @ 39993

Last change on this file since 39993 was 39993, checked in by obi, 5 years ago

update tithek

  • Property svn:executable set to *
File size: 34.9 KB
Line 
1#!/bin/sh
2# first sh box parser for titannit mfg obi
3
4. /tmp/localhoster/hoster.sh
5
6SRC=$1
7INPUT=$2
8FROM=$3
9PAGE=$4
10FILENAME=`echo $PAGE | tr '/' '.'`
11if [ -z "$PAGE" ]; then
12        FILENAME=none
13fi
14
15URL=http://livetv.sx
16PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'`
17NAME=Sports-On-Demand
18
19#rm -rf $TMP > /dev/null 2>&1
20mkdir $TMP > /dev/null 2>&1
21
22if [ `echo $SRC | grep ^"/mnt/parser" | wc -l` -gt 0 ];then
23        TYPE="$SRC - Shell script"
24elif [ `echo $SRC | grep ^"/var/swap" | wc -l` -gt 0 ];then
25        TYPE="Swap - Shell script"
26elif [ `echo $SRC | grep ^"/mnt/swapextensions" | wc -l` -gt 0 ];then
27        TYPE="Mnt - Shell script"
28else
29        TYPE="Flash - Shell script"
30fi
31
32init()
33{
34        rm -f /mnt/network/cookies > /dev/null 2>&1
35        rm -rf $TMP > /dev/null 2>&1
36        echo "$NAME ($TYPE)#$SRC $SRC mainmenu#http://atemio.dyndns.tv/mediathek/menu/$PARSER.jpg#$PARSER.jpg#TiThek#0"
37}
38
39mainmenu()
40{
41        if [ -e /etc/.beta ];then
42                echo "Live Sports#$SRC $SRC livelist live de#http://atemio.dyndns.tv/mediathek/menu/livesports.jpg#livesports.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
43                echo "Basketball#$SRC $SRC basketball#http://atemio.dyndns.tv/mediathek/menu/basketball.jpg#basketball.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
44        else
45                echo "Basketball#$SRC $SRC basketball#http://atemio.dyndns.tv/mediathek/menu/basketball.jpg#basketball.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
46        fi
47        echo "Ice Hockey#$SRC $SRC icehockey#http://atemio.dyndns.tv/mediathek/menu/icehockey.jpg#icehockey.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
48        echo "Fussball#$SRC $SRC fussball#http://atemio.dyndns.tv/mediathek/menu/fussball.jpg#fussball.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
49        echo "Handball#$SRC $SRC handball#http://atemio.dyndns.tv/mediathek/menu/handball.jpg#handball.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
50        echo "Football#$SRC $SRC football#http://atemio.dyndns.tv/mediathek/menu/football.jpg#football.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
51
52        echo "$TMP/$PARSER.$INPUT.list"
53}
54
55basketball()
56{
57        echo "NBA (Latest)#$SRC $SRC videos latest enx/videotourney/3#http://atemio.dyndns.tv/mediathek/menu/nba.latest.jpg#nba.latest.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
58        echo "NBA (Teams)#$SRC $SRC submenu teams enx/leagueresults/3/#http://atemio.dyndns.tv/mediathek/menu/nba.teams.jpg#nba.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
59        echo "NBA (Sorted Date)#$SRC $SRC year teams enx/leagueresults/3/#http://atemio.dyndns.tv/mediathek/menu/nba.date.jpg#nba.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
60
61        echo "German Bundesliga (Latest)#$SRC $SRC videos latest enx/videotourney/421#http://atemio.dyndns.tv/mediathek/menu/german.bundesliga.latest.jpg#german.bundesliga.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
62        echo "German Bundesliga (Teams)#$SRC $SRC submenu teams enx/leagueresults/421/#http://atemio.dyndns.tv/mediathek/menu/german.bundesliga.teams.jpg#german.bundesliga.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
63        echo "German Bundesliga (Sorted Date)#$SRC $SRC year teams enx/leagueresults/421/#http://atemio.dyndns.tv/mediathek/menu/german.bundesliga.date.jpg#german.bundesliga.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
64
65        echo "Italian Lega Basket (Latest)#$SRC $SRC videos latest enx/videotourney/668#http://atemio.dyndns.tv/mediathek/menu/italian.lega.basket.latest.jpg#italian.lega.basket.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
66        echo "Italian Lega Basket (Teams)#$SRC $SRC submenu teams enx/leagueresults/668/#http://atemio.dyndns.tv/mediathek/menu/italian.lega.basket.teams.jpg#italian.lega.basket.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
67        echo "Italian Lega Basket (Sorted Date)#$SRC $SRC year teams enx/leagueresults/668/#http://atemio.dyndns.tv/mediathek/menu/italian.lega.basket.date.jpg#italian.lega.basket.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
68
69        echo "European Championship (Latest)#$SRC $SRC videos latest enx/videotourney/282#http://atemio.dyndns.tv/mediathek/menu/european.championship.latest.jpg#european.championship.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
70        echo "European Championship (Teams)#$SRC $SRC submenu teams enx/leagueresults/282/#http://atemio.dyndns.tv/mediathek/menu/european.championship.teams.jpg#european.championship.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
71        echo "European Championship (Sorted Date)#$SRC $SRC year teams enx/leagueresults/282/#http://atemio.dyndns.tv/mediathek/menu/european.championship.date.jpg#european.championship.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
72
73        echo "Euroleague (Latest)#$SRC $SRC videos latest enx/videotourney/41#http://atemio.dyndns.tv/mediathek/menu/euroleague.latest.jpg#euroleague.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
74        echo "Euroleague (Teams)#$SRC $SRC submenu teams enx/leagueresults/41/#http://atemio.dyndns.tv/mediathek/menu/euroleague.teams.jpg#euroleague.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
75        echo "Euroleague (Sorted Date)#$SRC $SRC year teams enx/leagueresults/41/#http://atemio.dyndns.tv/mediathek/menu/euroleague.date.jpg#euroleague.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
76
77        echo "$TMP/$PARSER.$INPUT.list"
78}
79
80football()
81{
82        echo "NFL (Latest)#$SRC $SRC videos latest enx/videotourney/142#http://atemio.dyndns.tv/mediathek/menu/nfl.latest.jpg#nfl.latest.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
83        echo "NFL (Teams)#$SRC $SRC submenu teams enx/leagueresults/142/#http://atemio.dyndns.tv/mediathek/menu/nfl.teams.jpg#nfl.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
84        echo "NFL (Sorted Date)#$SRC $SRC year teams enx/leagueresults/142/#http://atemio.dyndns.tv/mediathek/menu/nfl.date.jpg#nfl.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
85        echo "$TMP/$PARSER.$INPUT.list"
86}
87
88
89handball()
90{
91        echo "Women. Champions League (Latest)#$SRC $SRC videos latest enx/videotourney/1249#http://atemio.dyndns.tv/mediathek/menu/women.champions.league.latest.jpg#women.champions.league.latest.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
92        echo "Women. Champions League (Teams)#$SRC $SRC submenu teams enx/leagueresults/1249/#http://atemio.dyndns.tv/mediathek/menu/women.champions.league.teams.jpg#women.champions.league.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
93        echo "Women. Champions League (Sorted Date)#$SRC $SRC year teams enx/leagueresults/1249/#http://atemio.dyndns.tv/mediathek/menu/women.champions.league.date.jpg#women.champions.league.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
94        echo "$TMP/$PARSER.$INPUT.list"
95}
96
97icehockey()
98{
99        echo "NHL (Latest)#$SRC $SRC videos latest enx/videotourney/2#http://atemio.dyndns.tv/mediathek/menu/nhl.latest.jpg#nhl.latest.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
100        echo "NHL (Teams)#$SRC $SRC submenu teams enx/leagueresults/2/#http://atemio.dyndns.tv/mediathek/menu/nhl.teams.jpg#nhl.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
101        echo "NHL (Sorted Date)#$SRC $SRC year teams enx/leagueresults/2/#http://atemio.dyndns.tv/mediathek/menu/nhl.date.jpg#nhl.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
102
103        echo "Champions League (Latest)#$SRC $SRC videos latest enx/videotourney/191#http://atemio.dyndns.tv/mediathek/menu/champions.league.latest.jpg#champions.league.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
104        echo "Champions League (Teams)#$SRC $SRC submenu teams enx/leagueresults/191/#http://atemio.dyndns.tv/mediathek/menu/champions.league.teams.jpg#champions.league.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
105        echo "Champions League (Sorted Date)#$SRC $SRC year teams enx/leagueresults/191/#http://atemio.dyndns.tv/mediathek/menu/champions.league.date.jpg#champions.league.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
106
107        echo "$TMP/$PARSER.$INPUT.list"
108}
109
110fussball()
111{
112        echo "1. Bundesliga (Latest)#$SRC $SRC videos latest enx/videotourney/36#http://atemio.dyndns.tv/mediathek/menu/dfb1.latest.jpg#dfb1.latest.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
113        echo "1. Bundesliga (Teams)#$SRC $SRC submenu teams enx/leagueresults/36/#http://atemio.dyndns.tv/mediathek/menu/dfb1.teams.jpg#dfb1.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
114        echo "1. Bundesliga (Sorted Date)#$SRC $SRC year teams enx/leagueresults/36/#http://atemio.dyndns.tv/mediathek/menu/dfb1.date.jpg#dfb1.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
115
116        echo "2. Bundesliga (Latest)#$SRC $SRC videos latest enx/videotourney/31#http://atemio.dyndns.tv/mediathek/menu/dfb2.latest.jpg#dfb2.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
117        echo "2. Bundesliga (Teams)#$SRC $SRC submenu teams enx/leagueresults/31/#http://atemio.dyndns.tv/mediathek/menu/dfb2.teams.jpg#dfb2.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
118        echo "2. Bundesliga (Sorted Date)#$SRC $SRC year teams enx/leagueresults/31/#http://atemio.dyndns.tv/mediathek/menu/dfb2.date.jpg#dfb2.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
119
120        echo "3. Bundesliga (Latest)#$SRC $SRC videos latest enx/videotourney/135#http://atemio.dyndns.tv/mediathek/menu/dfb3.latest.jpg#dfb3.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
121        echo "3. Bundesliga (Teams)#$SRC $SRC submenu teams enx/leagueresults/135/#http://atemio.dyndns.tv/mediathek/menu/dfb3.teams.jpg#dfb3.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
122        echo "3. Bundesliga (Sorted Date)#$SRC $SRC year teams enx/leagueresults/135/#http://atemio.dyndns.tv/mediathek/menu/dfb3.date.jpg#dfb3.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
123
124        echo "Italian Serie A (Latest)#$SRC $SRC videos latest enx/videotourney/11#http://atemio.dyndns.tv/mediathek/menu/isa.latest.jpg#isa.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
125        echo "Italian Serie A (Teams)#$SRC $SRC submenu teams enx/leagueresults/11/#http://atemio.dyndns.tv/mediathek/menu/isa.teams.jpg#isa.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
126        echo "Italian Serie A (Sorted Date)#$SRC $SRC year teams enx/leagueresults/11/#http://atemio.dyndns.tv/mediathek/menu/isa.date.jpg#isa.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
127
128        echo "English Premier League (Latest)#$SRC $SRC videos latest enx/videotourney/1#http://atemio.dyndns.tv/mediathek/menu/epl.latest.jpg#epl.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
129        echo "English Premier League (Teams)#$SRC $SRC submenu teams enx/leagueresults/1/#http://atemio.dyndns.tv/mediathek/menu/epl.teams.jpg#epl.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
130        echo "English Premier League (Sorted Date)#$SRC $SRC year teams enx/leagueresults/1/#http://atemio.dyndns.tv/mediathek/menu/epl.date.jpg#epl.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
131
132        echo "Europa League (Latest)#$SRC $SRC videos latest enx/videotourney/265#http://atemio.dyndns.tv/mediathek/menu/el.latest.jpg#el.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
133        echo "Europa League (Teams)#$SRC $SRC submenu teams enx/leagueresults/265/#http://atemio.dyndns.tv/mediathek/menu/el.teams.jpg#el.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
134        echo "Europa League (Sorted Date)#$SRC $SRC year teams enx/leagueresults/265/#http://atemio.dyndns.tv/mediathek/menu/el.date.jpg#el.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
135
136        echo "Champions League (Latest)#$SRC $SRC videos latest enx/videotourney/7#http://atemio.dyndns.tv/mediathek/menu/champions.league.latest.jpg#champions.league.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
137        echo "Champions League (Teams)#$SRC $SRC submenu teams enx/leagueresults/7/#http://atemio.dyndns.tv/mediathek/menu/champions.league.teams.jpg#champions.league.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
138        echo "Champions League (Sorted Date)#$SRC $SRC year teams enx/leagueresults/7/#http://atemio.dyndns.tv/mediathek/menu/champions.league.date.jpg#champions.league.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list
139
140        echo "$TMP/$PARSER.$INPUT.list"
141}
142
143year()
144{
145        rm $TMP/$PARSER.$INPUT.list > /dev/null 2>&1
146
147        if [ ! -e "/tmp/tithek/$PARSER.$INPUT.list" ]; then
148                tags=""
149                tagcount=`date +"%Y"`
150                i=2008
151                until [ "$i" -gt "$tagcount" ]
152                do
153                echo "$i#$SRC $SRC month year enx/videotourney/3/$i#http://atemio.dyndns.tv/mediathek/menu/$i.jpg#$i.jpg#$NAME#0" | sort -r >> $TMP/$PARSER.$INPUT.list
154                i=`expr $i + 1`
155                done
156        fi
157
158        echo "$TMP/$PARSER.$INPUT.list"
159}
160
161month()
162{
163        rm $TMP/$PARSER.$INPUT.list > /dev/null 2>&1
164
165        if [ ! -e "/tmp/tithek/$PARSER.$INPUT.list" ]; then
166                tags=""
167                usedyear=`echo $PAGE | tr '/' '\n' | tail -n1`
168                curyear=`date +"%Y"`
169                if [ "$usedyear" == "$curyear" ];then
170                        tagcount=`date +"%m"`
171                else
172                        tagcount=12
173                fi
174                i=1
175                until [ "$i" -gt "$tagcount" ]
176                do
177                echo "$i / $usedyear#$SRC $SRC videos latest $PAGE$i#http://atemio.dyndns.tv/mediathek/menu/$i.jpg#$i.jpg#$NAME#0" | sort -r >> $TMP/$PARSER.$INPUT.list
178                i=`expr $i + 1`
179                done
180        fi
181
182        echo "$TMP/$PARSER.$INPUT.list"
183}
184
185videos()
186{
187        if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
188                piccount=0
189                $wgetbin $URL/$PAGE -O $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1
190
191                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1 | tr '\n' ' ' | sed 's!height=27!\nfound=!g' | grep '^found=' >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2
192
193                while read -u 3 ROUND; do
194                        URL=`echo $ROUND | sed 's!<a href="/enx/eventinfo/!\nurl="/enx/eventinfo/!g' | grep ^url= | cut -d'"' -f2 | head -n1`
195                        TITLE=`echo $ROUND | sed 's!width="30%"> <b>!\ntitle=<!g' | grep ^title= | cut -d'<' -f2 | sed 's!&ndash;!-!g'`
196                        SCORE=`echo $ROUND | sed 's!<font color="#949494"><b>!\nextra=<!g' | grep ^extra= | cut -d'<' -f2 | sed 's!&ndash;!-!g'`
197
198                        if [ `echo $ROUND | sed 's!href=!\nurl=!g' | grep ^url= | grep "Full match record" | cut -d'"' -f2 | head -n1 | wc -l` -eq 0 ];then
199                                FULLVIDEO=""
200                        else
201                                FULLVIDEO="Full"
202                        fi
203
204                        PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
205                        if [ "$FROM" = "latest" ];then
206                                EXTRA=`echo $ROUND | sed 's!data-pop="ddr_!\ndate=_!g' | grep ^date= | cut -d'_' -f2`
207                        else
208                                EXTRA=`echo $ROUND | sed 's!<span class="date">!\ndate=<!g' | grep ^date= | cut -d'<' -f2`
209                        fi
210
211                        if [ ! -z "$TITLE" ] && [ ! -z "$SCORE" ];then
212                                TITLE="$TITLE ($SCORE)"
213                        fi
214
215                        if [ ! -z "$TITLE" ] && [ ! -z "$EXTRA" ];then
216                                TITLE="$TITLE ($EXTRA)"
217                        fi
218
219                        if [ ! -z "$TITLE" ] && [ ! -z "$FULLVIDEO" ];then
220                                TITLE="$TITLE ($FULLVIDEO)"
221                        fi
222
223                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ] && [ "$URL" != "http://xlivetv.sx" ] && [ `cat $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list | grep "#$URL#" | wc -l` -eq 0 ];then
224                                if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then
225                                        touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
226                                fi
227                                piccount=`expr $piccount + 1`
228
229                                URL="$SRC $SRC playsrc $INPUT $URL"
230
231                                LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#0"
232                                echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
233                        fi
234
235                done 3<$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2
236                rm $TMP/cache.* > /dev/null 2>&1
237        fi
238        echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
239}
240
241playsrc()
242{
243        if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
244                piccount=0
245#               $wgetbin $URL/$PAGE -O $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1
246                $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1
247
248                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<td width="33%">!\nfound=!g' | sed 's!<br> </td>!\n<br> </td>!g' | grep '^found=' >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2
249
250                while read -u 3 ROUND; do
251#                       URL=http://xlivetv.sx`echo $ROUND | sed 's!href=!\nurl=!g' | grep ^url= | cut -d'"' -f2 | head -n1`
252                        URL=`echo $ROUND | sed 's!href=!\nurl=!g' | grep ^url= | cut -d'"' -f2 | head -n1`
253                        TITLE=`echo $ROUND | sed 's!<a alt="!\ntitle="!g' | grep ^title= | cut -d'"' -f2 | sed 's!&ndash;!-!g'`
254                        PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
255                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ] && [ "$URL" != "http://xlivetv.sx" ] && [ `cat $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list | grep "#$URL#" | wc -l` -eq 0 ];then
256                                if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then
257                                        touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
258                                fi
259                                piccount=`expr $piccount + 1`
260#                               LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#98"
261                                URL="$SRC $SRC play $INPUT $URL"
262                                LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#111"
263
264                                echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
265                        fi
266
267                done 3<$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2
268                rm $TMP/cache.* > /dev/null 2>&1
269        fi
270        echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
271}
272
273play()
274{
275#rm $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
276#echo 1111111
277        if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
278                piccount=0
279
280                $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1
281#echo 222222
282
283                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<iframe src=!\nfound=!g' | sed 's!<br> </td>!\n<br> </td>!g' | grep '^found=' | grep 'video/embed' | cut -d"'" -f2 >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2
284                if [ `cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2 | wc -l` -gt 0 ];then
285#echo 333333
286
287                        URLTMP=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2`
288                        URLTMP=`echo $URLTMP | sed 's/true http/http/'`
289                        URLTMP=`echo $URLTMP | sed 's#true //#//#'`
290
291                        $curlbin $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3
292        #               "flashVars": {"autoplay":0,"movieSrc":"mail/arsen.bulyaev/_myvideo/738","metadataUrl":"//my.mail.ru/+/video/meta/4219658639352267490","showPauseRoll":"0","enable_search":"2","swfVersion":"29","static_version":"75","flash_enabled":"1"},
293                        cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!"movieSrc":!\nfound=!g' | grep '^found=' | cut -d'"' -f2 | head -n1 >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4
294                        TYPE=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4 | cut -d "/" -f2`
295                        ID=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4 | tr '/' '\n' | tail -n1`
296                        $curlbin http://videoapi.my.mail.ru/videos/mail/$TYPE/_myvideo/$ID.json?ver=0.2.60 --referer $URLTMP -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.5
297        #               $curlbin http://videoapi.my.mail.ru/videos/mail/arsen.bulyaev/_myvideo/738.json?ver=0.2.60 --referer $URLTMP -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.5
298
299                        cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.5 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!"url":!\nfound=!g' | grep '^found=' | cut -d'"' -f2 | tail -n1 >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.6
300                        URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.6`
301        #eplayer3 "http://cdn41.my.mail.ru/v/60128796.mp4?sign=43ff6ef971dd635bbff0a57a061a3548cfaceef8&slave[]=s%3Ahttp%3A%2F%2F127.0.0.1%3A5010%2F60128796-v.mp4&p=f&expire_at=1477882800&touch=1477731621&reg=202&region=202"
302                else
303#echo 4444444
304
305#               <iframe allowFullScreen allowFullScreen frameborder=0 marginheight=0 marginwidth=0 scrolling='no'src="http://emb.aliez.me/player/video.php?id=47383&s=t67axfnq&w=590&h=384" width="590" height="384">Your browser does not support inline frames or is currently configured not to display inline frames.</iframe>
306#                   <iframe allowFullScreen src="//livetv141.net/export/vk.reframe.php?ur4=http://vk.com/video_ext.php?oid=-55574239&id=456242297&hash=f78096b994400693&hd=1" width="600" height="338" frameborder="0" allowfullscreen></iframe>
307#                       <iframe allowFullScreen src="http://livetv141.net/export/vk.reframe.php?ur4=http://vk.com/video_ext.php?oid=-30408&id=456242896&hash=1bafa57efd8d7c50" width="600" height="338" frameborder="0" allowfullscreen></iframe>
308#                       <iframe allowFullScreen src='https://my.mail.ru/video/embed/4219658639352267889' width='626' height='367' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
309                        cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<iframe!\nfound=!g' | grep ^found | cut -d'"' -f2 | grep -v facebook >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2
310
311                        if [ `cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2 | grep "#f7f7f7" | wc -l` -eq 1 ];then
312                                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<iframe!\nfound=!g' | grep ^found | cut -d"'" -f2 | grep -v facebook | grep -v Search >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2
313                        fi
314
315#                       cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1 | tr '\r' ' ' | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<iframe!\nfound=!g' | grep ^found
316
317#                               cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<iframe!\nfound=!g' | grep ^found
318#echo 11111
319                        if [ -z "$URLTMP" ];then
320#echo 22222
321
322                                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1 | grep www.youtube.com | sed 's!src=!\nfound=!g' | grep ^found  | cut -d'"' -f2  >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2
323                        fi
324
325
326                        URLTMP=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2 | sed 's#//#\nhttp://#' | grep ^"http://"`
327#echo 555555c $URLTMP
328#<iframe allowFullScreen width="600" height="338" src="https://www.youtube.com/embed/17NnIkv2C3k" frameborder="0" allowfullscreen></iframe>
329
330
331                        if [ `echo $URLTMP | grep ^"//" | wc -l` -eq 1 ];then
332                                URLTMP=http:$URLTMP
333                        fi
334                        rm /mnt/network/cookies
335
336                        if [ `echo $URLTMP | grep "export/vk.reframe.php" | wc -l` -eq 1 ];then
337#echo 555555dd $URLTMP
338
339                                referer=$URLTMP
340                                $curlbin $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3
341                                # <iframe src="http://vk.com/video_ext.php?oid=-55574239&id=456242333&hash=8f52dbd56d595751&hd=1" frameborder="0" height="100%" width="100%"></iframe></body>
342                                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<iframe src=!\nfound=!g' | grep '^found=' | cut -d'"' -f2 | head -n1 >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4
343                                URLTMP=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4`
344                                URLTMP=`echo $URLTMP | sed 's/true http/http/'`
345                                URLTMP=`echo $URLTMP | sed 's#true //#//#'`
346#echo 555555ee $URLTMP
347
348                                $curlbin $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.5
349                                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.5 | grep vk.com | sed 's!href=!\nfound=!' | grep ^found | cut -d '"' -f2 | head -n1 >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.6
350                                URLTMP=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.6`
351                                URLTMP=`echo $URLTMP | sed 's/true http/http/'`
352                                URLTMP=`echo $URLTMP | sed 's#true //#//#'`
353
354                                if [ `echo $URLTMP | grep ^"//" | wc -l` -eq 1 ];then
355                                        URLTMP=https:$URLTMP
356                                fi
357#echo 555555ff $URLTMP
358
359                                email=`cat /mnt/config/titan.cfg | grep vk_user | cut -d"=" -f2`
360                                pass=`cat /mnt/config/titan.cfg | grep vk_pass | cut -d"=" -f2`
361
362                                $curlbin2 -v $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7
363                                loginurl="https://login.vk.com/?act=login"
364                                act=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="act"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
365                                role=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="role"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
366                                expire=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="expire"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
367                                captcha_sid=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="captcha_sid"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
368                                captcha_key=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="captcha_key"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
369                                _origin=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="_origin"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
370                                ip_h=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="ip_h"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
371                                lg_h=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="lg_h"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
372                                post="act=$act&role=$role&expire=$expire&captcha_sid=$captcha_sid&captcha_key=$captcha_key&_origin=$origin&ip_h=$ip_h&lg_h=$lg_h&email=$email&pass=$pass"
373
374                                $curlbin2 -v -X POST --data "$post" --referer "$URL$PAGE" "$loginurl" -D $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.8
375                                tmpurl="`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.8 | grep Location: | sed 's/Location: //' | tr '\0' ' ' | tr '\r' ' ' | tr '\n' ' ' | sed 's/\s//g'`"
376                                $curlbin2 "$tmpurl" > $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.9
377
378                                $curlbin2 -v $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.10
379                                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<iframe src=!\nfound=!g' | grep '^found=' | cut -d'"' -f2 | head -n1 >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.11
380                                URLTMP=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.11`
381                                URLTMP=`echo $URLTMP | sed 's#//#\nhttps://#' | grep ^"https://"`
382#echo 555555gg $URLTMP
383
384                                $curlbin $URLTMP --referer "$referer" -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.12
385
386                                if [ `cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.12 | grep "Authorization required" | wc -l` -eq 1 ];then
387                                        URL="errormsg=You need access to https://vk.com to use this full stream, add VK User/Pass on Tithek Settings"
388                                else
389                                        cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.12 | sed 's!<source src=!\nfound=!g' | grep ^found | grep .720. | cut -d'"' -f2 > $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.13.720
390                                        URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.13.720`
391                                        if [ -z "$URL" ];then
392                                                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.12 | sed 's!<source src=!\nfound=!g' | grep ^found | grep .360. | cut -d'"' -f2 > $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.13.360
393                                                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.13.360`
394                                        fi
395                                fi
396                        elif [ `echo $URLTMP | grep "youtube" | wc -l` -eq 1 ];then
397
398                                ID=`echo $URLTMP | tr '/' '\n' | tail -n1`
399                                URL="https://www.youtube.com/get_video_info?el=leanback&cplayer=UNIPLAYER&cos=Windows&height=1080&cbr=Chrome&hl=en_US&cver=4&ps=leanback&c=TVHTML5&video_id=$ID&cbrver=40.0.2214.115&width=1920&cosver=6.1&ssl_stream=1"
400                               
401#                               $curlbin "https://www.youtube.com/get_video_info?el=leanback&cplayer=UNIPLAYER&cos=Windows&height=1080&cbr=Chrome&hl=en_US&cver=4&ps=leanback&c=TVHTML5&video_id=17NnIkv2C3k&cbrver=40.0.2214.115&width=1920&cosver=6.1&ssl_stream=1"
402                               
403                        #       https://www.youtube.com/embed/17NnIkv2C3k
404
405#                               URL="$SRC $SRC hoster $INPUT $URL"
406                                URL="gethoster2 $URL"
407
408#                               URL="gethoster2 $URLTMP"
409
410#                               URL="$TITLE#$URL#$PIC#$PIC.jpg#$NAME#14"
411
412                        elif [ `echo $URLTMP | grep "/embed/" | wc -l` -eq 1 ];then
413#echo 666666
414
415                                $curlbin $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3
416                #               "flashVars": {"autoplay":0,"movieSrc":"mail/arsen.bulyaev/_myvideo/738","metadataUrl":"//my.mail.ru/+/video/meta/4219658639352267490","showPauseRoll":"0","enable_search":"2","swfVersion":"29","static_version":"75","flash_enabled":"1"},
417                #               "flashVars": {"autoplay":0,"movieSrc":"mail/arsen.bulyaev/_myvideo/1137","metadataUrl":"//my.mail.ru/+/video/meta/4219658639352267889","showPauseRoll":"0","enable_search":"2","swfVersion":"29","static_version":"77","flash_enabled":"1"},
418
419                                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!"movieSrc":!\nfound=!g' | grep '^found=' | cut -d'"' -f2 | head -n1 >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4
420                                TYPE=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4 | cut -d "/" -f2`
421                                ID=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4 | tr '/' '\n' | tail -n1`
422                                $curlbin http://videoapi.my.mail.ru/videos/mail/$TYPE/_myvideo/$ID.json?ver=0.2.60 --referer $URLTMP -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.5
423                #               $curlbin http://videoapi.my.mail.ru/videos/mail/arsen.bulyaev/_myvideo/738.json?ver=0.2.60 --referer $URLTMP -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.5
424
425                                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.5 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!"url":!\nfound=!g' | grep '^found=' | cut -d'"' -f2 | tail -n1 >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.6
426                                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.6`
427                        else
428#echo 7777777 $URLTMP
429                                URLTMP=`echo $URLTMP | sed 's/true http/http/'`
430                                URLTMP=`echo $URLTMP | sed 's#true //#//#'`
431#echo 8888888 $URLTMP
432
433                                $curlbin $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3
434                                cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3 | tr '\n' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!file:!\nfound=!g' | grep '^found=' | cut -d"'" -f2 | head -n1 >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4
435                                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4`
436                        fi
437                fi
438
439                echo $URL
440#               rm $TMP/cache.* > /dev/null 2>&1
441        fi
442#       echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
443}
444
445submenu()
446{
447        if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
448                piccount=0
449
450                $wgetbin $URL/$PAGE -O $TMP/cache.$PARSER.$FROM.$FILENAME.1
451#               cat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | sed 's!<a href="/enx/team/!\n<a href="/enx/team/!g' | grep '^<a href="/enx/team/' | tr ' ' '~' >$TMP/cache.$PARSER.$FROM.$FILENAME.2
452                cat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | sed 's!<a href="/enx/team/!\n<a href="/enx/team/!g' | grep '^<a href="/enx/team/' >$TMP/cache.$PARSER.$FROM.$FILENAME.2
453
454                while read -u 3 ROUND; do
455                        URL="$SRC $SRC videos $INPUT `echo $ROUND | cut -d'"' -f2 | sed 's!/calendar/!/video/!g'`"
456                        TITLE=`echo $ROUND | sed 's!<b>!\ntitle=<!g' | grep ^title= | cut -d'<' -f2`
457                        PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
458
459                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then
460                                if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then
461                                        touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
462                                fi
463                                piccount=$[$piccount+1]
464                                LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#0"
465                                echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
466                        fi
467
468                done 3<$TMP/cache.$PARSER.$FROM.$FILENAME.2
469                rm $TMP/cache.* > /dev/null 2>&1
470        fi
471        echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
472}
473
474livelist()
475{
476        rm $TMP/cache.* > /dev/null 2>&1
477        rm $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list > /dev/null 2>&1
478
479        if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
480                piccount=0
481                $wgetbin $URL/$PAGE -O $TMP/cache.$PARSER.$FROM.$FILENAME.1
482
483#               zcat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | tr '\n' ' ' | sed 's!<img width=27!\nfound=!g' | grep '^found=' | grep nba.gif | grep -v nhl >$TMP/cache.$PARSER.$FROM.$FILENAME.2
484                zcat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | tr '\n' ' ' | sed 's!<img width=27!\nfound=!g' | grep '^found=' >$TMP/cache.$PARSER.$FROM.$FILENAME.2
485
486                while read -u 3 ROUND; do
487                        URL=`echo $ROUND | sed 's!href=!\nurl=!g' | grep ^url= | cut -d'"' -f2 | head -n1`
488                        TITLE=`echo $ROUND | sed "s!$URL\">!\ntitle=<!g" | grep ^title= | cut -d'<' -f2 | sed 's!&ndash;!-!g'`
489                        SCORE=`echo $ROUND | sed 's!&nbsp; !\nscore=<!g' | grep ^score= | cut -d'<' -f2 | sed 's!&ndash;!-!g'`
490                        EXTRA=`echo $ROUND | sed 's!<span class="evdesc">!\nextra=<!g' | grep ^extra= | cut -d'<' -f2 | sed 's!&ndash;!-!g'`
491
492                        PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
493
494                        if [ ! -z "$TITLE" ] && [ ! -z "$SCORE" ];then
495                                TITLE="$TITLE ($SCORE)"
496                        fi
497
498                        if [ ! -z "$TITLE" ] && [ ! -z "$EXTRA" ];then
499                                TITLE="$TITLE $EXTRA"
500                        fi
501
502                        TITLE=`echo $TITLE | sed 's/&nbsp;//g'`
503                        TITLE=`echo $TITLE | sed 's/&ndash;/-/g'`
504                        TITLE=`echo $TITLE | sed 's/\n//g'`
505
506                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then
507                                if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then
508                                        touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
509                                fi
510
511                                piccount=`expr $piccount + 1`
512
513                                URL="$SRC $SRC hosterlist $INPUT '$URL'"
514
515                                LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#0"
516                                echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
517                        fi
518
519                done 3<$TMP/cache.$PARSER.$FROM.$FILENAME.2
520#               rm $TMP/cache.* > /dev/null 2>&1
521        fi
522        echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
523}
524
525hosterlist()
526{
527        rm $TMP/cache.* > /dev/null 2>&1
528        rm $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list > /dev/null 2>&1
529
530        if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
531                piccount=0
532                $curlbin "$URL/$PAGE" -o $TMP/cache.$PARSER.$FROM.$FILENAME.1
533
534                cat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | tr '\n' ' ' | sed "s!show_webplayer('!\nfound=('!g" | sed 's!src="!\nsrc="!g' | grep '^found=' >$TMP/cache.$PARSER.$FROM.$FILENAME.2
535
536                while read -u 3 ROUND; do
537                        URL=`echo $ROUND | sed 's!href=!\nurl=!g' | grep ^url= | cut -d'"' -f2 | head -n1 | sed 's!/webplayer.php!/export/webplayer.iframe.php!'`
538                        TITLE=`echo $ROUND | cut -d"'" -f2`
539                        EXTRA=`echo $ROUND | cut -d"'" -f4`
540
541                        PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
542
543                        if [ ! -z "$TITLE" ] && [ ! -z "$EXTRA" ];then
544                                TITLE="$TITLE ($EXTRA)"
545                        fi
546
547                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then
548                                if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then
549                                        touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
550                                fi
551                                piccount=`expr $piccount + 1`
552
553                                URL="$SRC $SRC hoster $INPUT '$URL'"
554#                               URL="$SRC $SRC findhoster $FROM '$URL'"
555
556                                LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#111"
557                                echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
558                        fi
559
560                done 3<$TMP/cache.$PARSER.$FROM.$FILENAME.2
561#               rm $TMP/cache.* > /dev/null 2>&1
562        fi
563        echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
564}
565################
566#                       <script type="text/javascript" language="JavaScript" src="http://hqstream.tv/pl?streampage=dsgdfhdffd26&width=700&height=480"></script>
567#
568#                       get http://hqstream.tv/pl?streampage=dsgdfhdffd26&width=700&height=480
569#                       document.write("<iframe FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO src=\"http://hqstream.tv/player.php?streampage=dsgdfhdffd26&height=480&width=700\" height=\"480\" width=\"700\"\></iframe>");
570#
571################
572#                       <iframe width="700" height="480" src="http://www.youtube.com/embed/PjF7_8_R9q8?autoplay=1" frameborder="0" allowfullscreen></iframe>
573
574#                       <script type="text/javascript" language="JavaScript" src="http://hqstream.tv/pl?streampage=dsgdfhdffd26&width=700&height=480"></script>
575#                               document.write("<iframe style='margin-top: 5px;' width=700 height=16 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no src='http://cdn.livetvcdn.net/cache/links/de.381782.html?" + Math.floor(new Date().getTime() / 100000) + "'></iframe>");
576
577#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="https://fsport.in/broadcasts/la_ua_2.php"></iframe>
578
579#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="http://www.laola1.tv/titanplayer.php?videoid=462888&type=S"></iframe>
580
581#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="http://tuttosportweb.com/update/ch3.html"></iframe>
582
583#                       <IFRAME FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO align="center" WIDTH=700 HEIGHT=480 SRC="http://leton.tv/player.php?streampage=sdfewfwe26&width=700&height=480"></IFRAME>
584
585#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="http://www.ehftv.com//player.php?play=467026&type=S&status=4&geo=int"></iframe>
586
587#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="http://fsport.in/broadcasts/stream_19.php"></iframe>
588#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="http://shstream.co/stream5/live5.php"></iframe>
589
590
591hoster()
592{
593        rm $TMP/cache.* > /dev/null 2>&1
594
595        $curlbin -o $TMP/cache.$PARSER.$INPUT.$FROM.1 ${PAGE}
596        URL=`zcat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
597        if [ -z "$URL" ];then
598                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
599        fi
600        if [ -z "$URL" ];then
601                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep "text/javascript" | grep -v jQuery | sed -nr 's/.*src="([^"]+)".*/\1/p'`
602        fi
603
604        echo $URL
605}
606
607case $INPUT in
608        init) $INPUT;;
609        mainmenu) $INPUT;;
610        basketball) $INPUT;;
611        icehockey) $INPUT;;
612        fussball) $INPUT;;
613        handball) $INPUT;;
614        football) $INPUT;;
615        livelist) $INPUT;;
616        hosterlist) $INPUT;;
617        hoster) $INPUT;;
618        videos) $INPUT;;
619        play) $INPUT;;
620        playsrc) $INPUT;;
621        submenu) $INPUT;;
622        month) $INPUT;;
623        year) $INPUT;;
624esac
Note: See TracBrowser for help on using the repository browser.