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

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

update sport

  • Property svn:executable set to *
File size: 34.2 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        debug=1
276
277        if [ "$debug" = "1" ]; then rm $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list; fi
278        if [ "$debug" = "1" ]; then echo $INPUT 1111111; fi
279
280        if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
281                piccount=0
282
283                $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.1
284                if [ "$debug" = "1" ]; then echo $INPUT 222222; fi
285
286                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
287                if [ `cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2 | wc -l` -gt 0 ];then
288                        URLTMP=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2 | sed 's#//#\nhttp://#' | grep ^"http://"`
289                        if [ "$debug" = "1" ]; then echo $INPUT 333333 $URLTMP; fi
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                        if [ "$debug" = "1" ]; then echo $INPUT 444444 $URLTMP; fi
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 | sed 's!src=!\nfound=!g' | grep ^found | cut -d'"' -f2 | grep -v facebook | grep -v getbanner.php | grep -v userapi | grep http >$TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2
310
311                        URLTMP=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.2 | sed 's#//#\nhttp://#' | grep ^"http://"`
312                        if [ "$debug" = "1" ]; then echo $INPUT 555555 $URLTMP; fi
313
314                        rm /mnt/network/cookies
315
316                        if [ `echo $URLTMP | grep "export/vk.reframe.php" | wc -l` -eq 1 ];then
317                                if [ "$debug" = "1" ]; then echo $INPUT 666666 $URLTMP; fi
318
319                                referer=$URLTMP
320                                $curlbin $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3
321                                # <iframe src="http://vk.com/video_ext.php?oid=-55574239&id=456242333&hash=8f52dbd56d595751&hd=1" frameborder="0" height="100%" width="100%"></iframe></body>
322                                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
323                                URLTMP=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4 | sed 's#//#\nhttps://#' | grep ^"https://"`
324                                if [ "$debug" = "1" ]; then echo $INPUT 777777 $URLTMP; fi
325
326                                $curlbin $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.5
327                                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
328                                URLTMP=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.6 | sed 's#//#\nhttps://#' | grep ^"https://"`
329                                if [ "$debug" = "1" ]; then echo $INPUT 888888 $URLTMP; fi
330
331                                email=`cat /mnt/config/titan.cfg | grep vk_user | cut -d"=" -f2`
332                                pass=`cat /mnt/config/titan.cfg | grep vk_pass | cut -d"=" -f2`
333
334                                $curlbin2 -v $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7
335                                loginurl="https://login.vk.com/?act=login"
336                                act=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="act"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
337                                role=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="role"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
338                                expire=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="expire"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
339                                captcha_sid=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="captcha_sid"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
340                                captcha_key=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="captcha_key"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
341                                _origin=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="_origin"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
342                                ip_h=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="ip_h"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
343                                lg_h=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.7 | sed 's!name="lg_h"!\nfound=!' | grep ^found | cut -d'"' -f2| head -n1`
344                                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"
345
346                                $curlbin2 -v -X POST --data "$post" --referer "$URL$PAGE" "$loginurl" -D $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.8
347                                tmpurl="`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.8 | grep Location: | sed 's/Location: //' | tr '\0' ' ' | tr '\r' ' ' | tr '\n' ' ' | sed 's/\s//g'`"
348                                $curlbin2 "$tmpurl" > $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.9
349
350                                $curlbin2 -v $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.10
351                                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
352                                URLTMP=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.11 | sed 's#//#\nhttps://#' | grep ^"https://"`
353                                if [ "$debug" = "1" ]; then echo $INPUT 999999 $URLTMP; fi
354
355                                $curlbin $URLTMP --referer "$referer" -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.12
356
357                                if [ `cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.12 | grep "Authorization required" | wc -l` -eq 1 ];then
358                                        URL="errormsg=You need access to https://vk.com to use this full stream, add VK User/Pass on Tithek Settings"
359                                else
360                                        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
361                                        URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.13.720`
362                                        if [ -z "$URL" ];then
363                                                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
364                                                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.13.360`
365                                        fi
366                                fi
367                        elif [ `echo $URLTMP | grep "youtube" | wc -l` -eq 1 ];then
368                                if [ "$debug" = "1" ]; then echo $INPUT aaaaaa $URLTMP; fi
369
370                                ID=`echo $URLTMP | tr '/' '\n' | tail -n1`
371                                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"
372                               
373#                               $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"
374                               
375                        #       https://www.youtube.com/embed/17NnIkv2C3k
376
377#                               URL="$SRC $SRC hoster $INPUT $URL"
378                                URL="gethoster2 $URL"
379
380#                               URL="gethoster2 $URLTMP"
381
382#                               URL="$TITLE#$URL#$PIC#$PIC.jpg#$NAME#14"
383
384                        elif [ `echo $URLTMP | grep "/embed/" | wc -l` -eq 1 ];then
385                                if [ "$debug" = "1" ]; then echo $INPUT bbbbbb $URLTMP; fi
386
387                                $curlbin $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3
388                #               "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"},
389                #               "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"},
390
391                                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
392                                TYPE=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4 | cut -d "/" -f2`
393                                ID=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4 | tr '/' '\n' | tail -n1`
394                                $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
395                #               $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
396
397                                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
398                                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.6`
399                        else
400                                if [ "$debug" = "1" ]; then echo $INPUT eeeeee $URLTMP; fi
401                                URLTMP=`echo $URLTMP  | sed 's#//#\nhttp://#' | grep ^"http://"`
402                                if [ "$debug" = "1" ]; then echo $INPUT cccccc $URLTMP; fi
403
404                                $curlbin $URLTMP --referer $URL$PAGE -o $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.3
405                                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
406                                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.$FILENAME.4`
407                        fi
408                fi
409
410                echo $URL
411                if [ "$debug" = "0" ]; then rm $TMP/cache.* > /dev/null 2>&1; fi
412        fi
413#       echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
414}
415
416submenu()
417{
418        if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
419                piccount=0
420
421                $wgetbin $URL/$PAGE -O $TMP/cache.$PARSER.$FROM.$FILENAME.1
422#               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
423                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
424
425                while read -u 3 ROUND; do
426                        URL="$SRC $SRC videos $INPUT `echo $ROUND | cut -d'"' -f2 | sed 's!/calendar/!/video/!g'`"
427                        TITLE=`echo $ROUND | sed 's!<b>!\ntitle=<!g' | grep ^title= | cut -d'<' -f2`
428                        PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
429
430                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then
431                                if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then
432                                        touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
433                                fi
434                                piccount=$[$piccount+1]
435                                LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#0"
436                                echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
437                        fi
438
439                done 3<$TMP/cache.$PARSER.$FROM.$FILENAME.2
440                rm $TMP/cache.* > /dev/null 2>&1
441        fi
442        echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
443}
444
445livelist()
446{
447        rm $TMP/cache.* > /dev/null 2>&1
448        rm $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list > /dev/null 2>&1
449
450        if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
451                piccount=0
452                $wgetbin $URL/$PAGE -O $TMP/cache.$PARSER.$FROM.$FILENAME.1
453
454#               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
455                zcat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | tr '\n' ' ' | sed 's!<img width=27!\nfound=!g' | grep '^found=' >$TMP/cache.$PARSER.$FROM.$FILENAME.2
456
457                while read -u 3 ROUND; do
458                        URL=`echo $ROUND | sed 's!href=!\nurl=!g' | grep ^url= | cut -d'"' -f2 | head -n1`
459                        TITLE=`echo $ROUND | sed "s!$URL\">!\ntitle=<!g" | grep ^title= | cut -d'<' -f2 | sed 's!&ndash;!-!g'`
460                        SCORE=`echo $ROUND | sed 's!&nbsp; !\nscore=<!g' | grep ^score= | cut -d'<' -f2 | sed 's!&ndash;!-!g'`
461                        EXTRA=`echo $ROUND | sed 's!<span class="evdesc">!\nextra=<!g' | grep ^extra= | cut -d'<' -f2 | sed 's!&ndash;!-!g'`
462
463                        PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
464
465                        if [ ! -z "$TITLE" ] && [ ! -z "$SCORE" ];then
466                                TITLE="$TITLE ($SCORE)"
467                        fi
468
469                        if [ ! -z "$TITLE" ] && [ ! -z "$EXTRA" ];then
470                                TITLE="$TITLE $EXTRA"
471                        fi
472
473                        TITLE=`echo $TITLE | sed 's/&nbsp;//g'`
474                        TITLE=`echo $TITLE | sed 's/&ndash;/-/g'`
475                        TITLE=`echo $TITLE | sed 's/\n//g'`
476
477                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then
478                                if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then
479                                        touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
480                                fi
481
482                                piccount=`expr $piccount + 1`
483
484                                URL="$SRC $SRC hosterlist $INPUT '$URL'"
485
486                                LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#0"
487                                echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
488                        fi
489
490                done 3<$TMP/cache.$PARSER.$FROM.$FILENAME.2
491#               rm $TMP/cache.* > /dev/null 2>&1
492        fi
493        echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
494}
495
496hosterlist()
497{
498        rm $TMP/cache.* > /dev/null 2>&1
499        rm $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list > /dev/null 2>&1
500
501        if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
502                piccount=0
503                $curlbin "$URL/$PAGE" -o $TMP/cache.$PARSER.$FROM.$FILENAME.1
504
505                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
506
507                while read -u 3 ROUND; do
508                        URL=`echo $ROUND | sed 's!href=!\nurl=!g' | grep ^url= | cut -d'"' -f2 | head -n1 | sed 's!/webplayer.php!/export/webplayer.iframe.php!'`
509                        TITLE=`echo $ROUND | cut -d"'" -f2`
510                        EXTRA=`echo $ROUND | cut -d"'" -f4`
511
512                        PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
513
514                        if [ ! -z "$TITLE" ] && [ ! -z "$EXTRA" ];then
515                                TITLE="$TITLE ($EXTRA)"
516                        fi
517
518                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then
519                                if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then
520                                        touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
521                                fi
522                                piccount=`expr $piccount + 1`
523
524                                URL="$SRC $SRC hoster $INPUT '$URL'"
525#                               URL="$SRC $SRC findhoster $FROM '$URL'"
526
527                                LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#111"
528                                echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
529                        fi
530
531                done 3<$TMP/cache.$PARSER.$FROM.$FILENAME.2
532#               rm $TMP/cache.* > /dev/null 2>&1
533        fi
534        echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
535}
536################
537#                       <script type="text/javascript" language="JavaScript" src="http://hqstream.tv/pl?streampage=dsgdfhdffd26&width=700&height=480"></script>
538#
539#                       get http://hqstream.tv/pl?streampage=dsgdfhdffd26&width=700&height=480
540#                       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>");
541#
542################
543#                       <iframe width="700" height="480" src="http://www.youtube.com/embed/PjF7_8_R9q8?autoplay=1" frameborder="0" allowfullscreen></iframe>
544
545#                       <script type="text/javascript" language="JavaScript" src="http://hqstream.tv/pl?streampage=dsgdfhdffd26&width=700&height=480"></script>
546#                               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>");
547
548#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="https://fsport.in/broadcasts/la_ua_2.php"></iframe>
549
550#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="http://www.laola1.tv/titanplayer.php?videoid=462888&type=S"></iframe>
551
552#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="http://tuttosportweb.com/update/ch3.html"></iframe>
553
554#                       <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>
555
556#               <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>
557
558#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="http://fsport.in/broadcasts/stream_19.php"></iframe>
559#               <iframe scrolling="no" frameborder=0 width=700 height=480 src="http://shstream.co/stream5/live5.php"></iframe>
560
561
562hoster()
563{
564        rm $TMP/cache.* > /dev/null 2>&1
565
566        $curlbin -o $TMP/cache.$PARSER.$INPUT.$FROM.1 ${PAGE}
567        URL=`zcat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
568        if [ -z "$URL" ];then
569                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
570        fi
571        if [ -z "$URL" ];then
572                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep "text/javascript" | grep -v jQuery | sed -nr 's/.*src="([^"]+)".*/\1/p'`
573        fi
574
575        echo $URL
576}
577
578case $INPUT in
579        init) $INPUT;;
580        mainmenu) $INPUT;;
581        basketball) $INPUT;;
582        icehockey) $INPUT;;
583        fussball) $INPUT;;
584        handball) $INPUT;;
585        football) $INPUT;;
586        livelist) $INPUT;;
587        hosterlist) $INPUT;;
588        hoster) $INPUT;;
589        videos) $INPUT;;
590        play) $INPUT;;
591        playsrc) $INPUT;;
592        submenu) $INPUT;;
593        month) $INPUT;;
594        year) $INPUT;;
595esac
Note: See TracBrowser for help on using the repository browser.