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

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

fix streamlive.sh sportsondemand.sh piccount

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