source: titan/mediathek/localhoster/hoster.sh @ 42919

Last change on this file since 42919 was 42919, checked in by obi, 2 years ago

tithek foy thevideo

  • Property svn:executable set to *
File size: 33.4 KB
Line 
1#!/bin/bash
2# first sh box hoster for titannit mfg obi
3
4TYPE=$1
5INPUT=$2
6DEST=$3
7USER=$DEST
8PASS=$4
9
10INPUT=`echo $INPUT | sed 's!/Out/?s=!!g'`
11
12#FILENAME="`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'` $INPUT $PAGE $NEXT"
13FILENAME="`echo $INPUT | sed 's/User-Agent.*//' | sed -e 's/|//g' | sed -e 's/\-\+/./g' | sed -e 's/\+\+/./g' | sed -e 's/\&\+/./g' -e 's#\/\+#.#g' -e 's/\?\+/./g' -e 's/:\+/./g' -e 's/;\+/./g' -e 's/=\+/./g' -e 's/ \+/./g' -e 's/\.\+/./g'`"
14PICNAME=`echo $FILENAME`
15
16if [ -z "$FILENAME" ]; then
17        FILENAME=none
18fi
19
20ARCH=`cat /etc/.arch`
21BOX=`cat /etc/model`
22TMP=/tmp/localcache
23CMD=/tmp/localhoster
24BIN="$CMD"/bin/python."$ARCH"
25HLSBIN="$CMD"/bin/hlsdl."$ARCH"
26CURLBIN="$CMD"/bin/curl."$ARCH"
27DUKBIN="$CMD"/bin/duk."$ARCH"
28if [ "$ARCH" == "i386" ]; then
29BIN=/usr/bin/python
30HLSBIN=/usr/bin/hlsdl
31CURLBIN=/usr/bin/curl
32DUKBIN=/usr/bin/duk
33fi
34
35if [ ! -e "$CURLBIN" ];then CURLBIN=curl; fi
36#USERAGENT='Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0'
37AUTH='aUtzhFRTzuDFa:JNHZbghnjuz'
38USERAGENT='Mozilla%2F5.0+%28Windows+NT+6.3%3B+rv%3A36.0%29+Gecko%2F20100101+Firefox%2F36.0'
39debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
40curlbin="$CURLBIN -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A $USERAGENT -u $AUTH"
41curlbin2="$CURLBIN -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A $USERAGENT -u $AUTH"
42youtubebin="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent $USERAGENT --format mp4 --restrict-filenames --ignore-errors -g"
43youtubebinbg="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent $USERAGENT --format mp4 --restrict-filenames --ignore-errors --output"
44hlsdlbg="$HLSBIN -u $USERAGENT -o"
45
46if [ -e /mnt/network/cookies ];then sed 's/#HttpOnly_//g' -i /mnt/network/cookies; fi
47
48export PYTHONHOME=/tmp/localhoster
49export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/localhoster/lib
50
51
52if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
53if [ "$debuglevel" == "99" ]; then curlbin2="$curlbin2 -v"; fi
54if [ "$debuglevel" == "99" ]; then youtubebin="$youtubebin --verbose"; fi
55
56wgetbin="wget -q -T2"
57
58if [ "$ARCH" == "i386" ]; then
59        if [ -d "/tmp/localhoster/lib/python2.7" ];then
60                mv -f /tmp/localhoster/lib/python2.7 /tmp/localhoster/lib/python2.7_old
61        fi
62        ln -fs /usr/lib/python2.7 /tmp/localhoster/lib/python2.7
63fi
64
65if [ ! -e "/tmp/localhoster/lib/python2.7/lib-dynload" ] && [ -e /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" ];then
66#       ln -fs /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" /tmp/localhoster/lib/python2.7/lib-dynload
67        time mv -f /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" /tmp/localhoster/lib/python2.7/lib-dynload
68        time rm -rf /tmp/localhoster/lib/python2.7/lib-dynload.*
69fi
70if [ ! -e "/tmp/localhoster/lib/libpython2.7.so.1.0" ] && [ -e /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" ];then
71#       ln -fs /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" /tmp/localhoster/lib/libpython2.7.so.1.0
72        time mv -f /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" /tmp/localhoster/lib/libpython2.7.so.1.0
73        time rm -f /tmp/localhoster/lib/libpython2.7.so.1.0.*
74fi
75if [ ! -e "/tmp/localhoster/lib/libcrypto.so.1.0.0" ] && [ -e /tmp/localhoster/lib/libcrypto.so.1.0.0."$ARCH" ];then
76#       ln -fs /tmp/localhoster/lib/libcrypto.so.1.0.0."$ARCH" /tmp/localhoster/lib/libcrypto.so.1.0.0
77        time mv -f /tmp/localhoster/lib/libcrypto.so.1.0.0."$ARCH" /tmp/localhoster/lib/libcrypto.so.1.0.0
78        time rm -f /tmp/localhoster/lib/libcrypto.so.1.0.0.*
79fi
80if [ ! -e "/tmp/localhoster/lib/libssl.so.1.0.0" ] && [ -e /tmp/localhoster/lib/libssl.so.1.0.0."$ARCH" ];then
81#       ln -fs /tmp/localhoster/lib/libssl.so.1.0.0."$ARCH" /tmp/localhoster/lib/llibssl.so.1.0.0
82        time mv -f /tmp/localhoster/lib/libssl.so.1.0.0."$ARCH" /tmp/localhoster/lib/libssl.so.1.0.0
83        time rm -f /tmp/localhoster/lib/libssl.so.1.0.0.*
84fi
85
86if [ -e "$TMP/hoster.tar" ]; then time rm -f $TMP/hoster.tar; fi
87if [ -e "$TMP/parser.tar" ]; then time rm -f $TMP/parser.tar; fi
88
89if [ "$ARCH" == "sh4" ];then #&& [ "$BOX" != "ufs912" ]; then
90        if [ -e "$CMD/lib/python2.7/lib-dynload.mipsel" ]; then time rm -rf $CMD/lib/python2.7/lib-dynload.mipsel; fi
91        if [ -e "$CMD/lib/python2.7/lib-dynload.arm" ]; then time rm -rf $CMD/lib/python2.7/lib-dynload.arm; fi
92
93        if [ -e "$CMD/lib/libpython2.7.so.1.0.mipsel" ]; then time rm -rf $CMD/lib/libpython2.7.so.1.0.mipsel; fi
94        if [ -e "$CMD/lib/libpython2.7.so.1.0.arm" ]; then time rm -rf $CMD/lib/libpython2.7.so.1.0.arm; fi
95
96        if [ -e "$CMD/lib/libssl.so.1.0.0.mipsel" ]; then time rm -rf $CMD/lib/libssl.so.1.0.0.mipsel; fi
97        if [ -e "$CMD/lib/libssl.so.1.0.0.arm" ]; then time rm -rf $CMD/lib/libssl.so.1.0.0.arm; fi
98
99        if [ -e "$CMD/lib/libcrypto.so.1.0.0.mipsel" ]; then time rm -rf $CMD/lib/libcrypto.so.1.0.0.mipsel; fi
100        if [ -e "$CMD/lib/libcrypto.so.1.0.0.arm" ]; then time rm -rf $CMD/lib/libcrypto.so.1.0.0.arm; fi
101fi
102
103hostercheck=`echo "$INPUT" | tr 'A-Z' 'a-z' | sed 's!://!\n!' | cut -d"/" -f1 | tail -n1 | tr '.' '\n' | wc -l`
104hosterline=`expr $hostercheck - 1`
105if [ "$hosterline" == "0" ];then hosterline=1; fi
106hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!://!\n!' | cut -d"/" -f1 | tail -n1 | cut -d"." -f$hosterline`
107
108ecostream()
109{
110        hosterurl=http://www.ecostream.tv
111        data="tpm=`$curlbin $INPUT | grep footerhash | cut -d"'" -f2``$curlbin $INPUT | grep superslots | cut -d"'" -f2`&id=`$curlbin $INPUT | grep data-id | cut -d'"' -f4`"
112        streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2`
113        streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6`
114        if [ "`echo $streamurl | grep DOCTYPE | wc -l`" -eq 0 ] && [ "$streamurl" != "$hosterurl" ];then
115                echo $streamurl
116        fi
117}
118
119giga()
120{
121        streampage=`$curlbin $INPUT | grep "<iframe src=" | cut -d'"' -f2 | head -n1`
122        streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 1080p`
123        if [ -z "$streamurl" ];then
124                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 720p`
125        fi
126        if [ -z "$streamurl" ];then
127                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 480p`
128        fi
129        if [ -z "$streamurl" ];then
130                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 360p`
131        fi
132        if [ -z "$streamurl" ];then
133                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 240p`
134        fi
135        if [ -z "$streamurl" ];then
136                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 180p`
137        fi
138        echo $streamurl
139}
140
141vidup()
142{
143        $BIN $CMD/vidup.py $INPUT
144}
145
146nosvideo()
147{
148        $BIN $CMD/nosvideo.py $INPUT
149}
150
151allmyvideos()
152{
153        $BIN $CMD/allmyvideos.py $INPUT
154}
155
156flashx()
157{
158        $BIN $CMD/flashx.py $INPUT
159}
160
161openload()
162{
163        $BIN $CMD/openload.py $INPUT
164}
165
166briskfile()
167{
168        $BIN $CMD/briskfile.py $INPUT
169}
170
171vodlockerold()
172{
173        $BIN $CMD/vodlocker.py $INPUT
174}
175
176videoweed()
177{
178        $BIN $CMD/videoweed.py $INPUT
179}
180
181vodzi()
182{
183        $BIN $CMD/vodzi.py $INPUT
184}
185
186youwatch()
187{
188        $BIN $CMD/youwatch.py $INPUT
189}
190
191thevideo()
192{
193        $BIN $CMD/thevideo.py $INPUT > $TMP/cache.$FILENAME.1
194
195        videocode=`cat $TMP/cache.$FILENAME.1`
196
197        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
198
199        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
200        if [ -e "$STREAMLIST" ];then
201                rm -f $STREAMLIST > /dev/null 2>&1
202        fi
203
204        $curlbin --data '{}' https://vev.io/api/serve/video/$videocode -o $TMP/cache.$FILENAME.2
205        cat $TMP/cache.$FILENAME.2 | sed 's/{/\n/g' | sed 's/,/\n/g' | grep "/stream/" >$TMP/cache.$FILENAME.3
206
207        while read -u 3 ROUND; do
208                TITEL=`echo $ROUND | cut -d'"' -f2`
209                URL=`echo $ROUND | cut -d'"' -f4`
210
211                if [ ! -z "$URL" ];then
212                        echo "$URL" | tr -d '\n' | tr -d '\r' >> $STREAMLIST
213                        echo "" >> $STREAMLIST
214                fi
215
216
217        done 3<$TMP/cache.$FILENAME.3
218        rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
219        echo $STREAMLIST
220}
221
222movshare()
223{
224        $BIN $CMD/movshare.py $INPUT
225}
226
227streamcloud()
228{
229        $BIN $CMD/streamcloud.py $INPUT
230}
231
232vidzi()
233{
234        $BIN $CMD/vidzi.py $INPUT
235}
236
237vivo()
238{
239        $BIN $CMD/vivo.py $INPUT
240}
241
242vidto()
243{
244        $BIN $CMD/vidto.py $INPUT
245}
246
247goldesel()
248{
249        $BIN $CMD/goldesel.py $INPUT
250}
251
252cloudflare()
253{
254        mkdir $TMP > /dev/null 2>&1
255        rm -f $TMP/cache.hoster.$hoster.1 > /dev/null 2>&1
256        $BIN $CMD/cloudflare.py $INPUT > $TMP/cache.hoster.$hoster.1 2>&1
257        if [ `cat $TMP/cache.hoster.$hoster.1 | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then
258                ERROR=`cat $TMP/cache.hoster.$hoster.1 | grep urllib2.HTTPError:`
259                echo "errormsg=$ERROR"
260        else
261                cat $TMP/cache.hoster.$hoster.1
262        fi
263}
264
265kinox()
266{
267        mkdir $TMP > /dev/null 2>&1
268        rm -f $TMP/cache.hoster.$hoster.1 > /dev/null 2>&1
269
270        if [ "$TYPE" == "get" ];then
271                $BIN $CMD/cloudflare.py $INPUT > $TMP/cache.hoster.$hoster.1 2>&1
272                if [ `cat $TMP/cache.hoster.$hoster.1 | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then
273                        ERROR=`echo $INPUT | grep urllib2.HTTPError:`
274                        echo "errormsg=$ERROR"
275                else
276                        cat $TMP/cache.hoster.$hoster.1
277                fi
278        elif [ "$TYPE" == "hoster" ];then
279
280                if [ `echo $INPUT | grep "/aGET/" | wc -l` -eq 1 ];then
281                        URL=`$BIN $CMD/cloudflare.py $INPUT | tr -d '\\' | sed -nr 's/.*<iframe src="([^"]+)".*/\1/p'`
282                        if [ -z "$URL" ];then
283                                URL=`$BIN $CMD/cloudflare.py $INPUT | tr -d '\\' | sed -nr 's/.*<a href="([^"]+)".*/\1/p'`
284                        fi
285                        if [ `echo $URL | grep "urllib2.HTTPError" | wc -l` -eq 1 ];then
286                                ERROR=`echo $INPUT | grep urllib2.HTTPError:`
287                                echo "errormsg=$ERROR"
288                        else
289                                if [ `echo $URL | grep ^"//" | wc -l` -eq 1 ];then
290                                        echo "http:$URL"
291                                else
292                                        echo "$URL"
293                                fi
294                        fi
295                else
296                        $BIN $CMD/cloudflare.py $INPUT         
297                fi     
298        fi
299}
300
301nowvideo()
302{
303        $BIN $CMD/nowvideo.py $INPUT
304}
305
306divxstage()
307{
308        $BIN $CMD/divxstage.py $INPUT
309}
310
311novamov()
312{
313        $BIN $CMD/novamov.py $INPUT
314}
315
316xvidstage()
317{
318        $BIN $CMD/xvidstage.py $INPUT
319}
320
321waaw()
322{
323        $BIN $CMD/waaw.py $INPUT
324}
325
326streamango()
327{
328        $BIN $CMD/streamango.py $INPUT
329}
330
331vidlox()
332{
333        $BIN $CMD/vidlox.py $INPUT
334}
335
336vidcloud()
337{
338        $BIN $CMD/vidcloud.py $INPUT
339}
340
341vodlocker()
342{
343        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
344
345        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
346        if [ -e "$STREAMLIST" ];then
347                rm -f $STREAMLIST > /dev/null 2>&1
348        fi
349
350        PAGE=`echo $INPUT | cut -d"|" -f1`
351        REFERER=`echo $INPUT | cut -d"|" -f2`
352
353        $curlbin "$PAGE" -o $TMP/cache.$FILENAME.1
354        cat $TMP/cache.$FILENAME.1 | sed 's/<source src/\n<source src/g' | sed -nr "s/.*src='([^']+)'.*/\1/p" | grep getfile >$TMP/cache.$FILENAME.2
355
356        while read -u 3 ROUND; do
357                NEWPAGE="$ROUND"
358
359                $curlbin2 -v "$NEWPAGE" --dump-header $TMP/cache.hoster.$hoster.1
360                cat $TMP/cache.hoster.$hoster.1 | grep ^Location: | cut -d" " -f2 >$TMP/cache.hoster.$hoster.1.url1
361                URL=`cat $TMP/cache.hoster.$hoster.1.url1`"|$REFERER"
362
363                CURTIME=`date +%s`
364                if [ `cat /mnt/network/cookies | grep .movie4k.ag | grep approve | wc -l` -eq 0 ];then
365                        echo ".movie4k.ag     TRUE    /       FALSE   $CURTIME      approve         1" >> /mnt/network/cookies
366                fi
367
368                if [ ! -z "$URL" ];then
369                        echo "$URL" | tr -d '\n' | tr -d '\r' >> $STREAMLIST
370                        echo "" >> $STREAMLIST
371
372                        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
373                        sed 's/.movie2k.ag/.movie4k.ag/g' -i /mnt/network/cookies
374                fi
375
376
377        done 3<$TMP/cache.$FILENAME.2
378        rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
379
380        URL=$STREAMLIST
381
382        echo "$URL"
383}
384
385aliezold()
386{
387        URL=`$curlbin "$INPUT" | sed 's/source:/\nsource:/' | grep ^source: | cut -d"'" -f2`
388        REFERER=`echo "$INPUT" | sed -e 's/=/3D/g' -e 's/&/26/g'`
389        echo "$URL|Referer=$REFERER&User-Agent=$USERAGENT"
390}
391
392aliez()
393{
394        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
395        #http://emb.aliez.me/player/live.php?id=56180&w=700&h=480"
396        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
397        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
398
399        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
400        if [ -e "$STREAMLIST" ];then
401                rm -f $STREAMLIST > /dev/null 2>&1
402        fi
403
404        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
405        cat $TMP/cache.hoster.$hoster.1 | sed 's/source:/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url1
406        URL=`cat $TMP/cache.hoster.$hoster.url1 | head -n1`
407        if [ ! -z "$URL" ];then
408                echo "$URL$EXTRA" >> $STREAMLIST
409        fi
410#       URL=""
411        #file:  'http://a3.aliez.me:8080/hls/streama57449/index.m3u8?st=dgw2dOq8tyFkLLBLn2ycXA',
412
413        cat $TMP/cache.hoster.$hoster.1 | sed 's/file:/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url2
414        URL=`cat $TMP/cache.hoster.$hoster.url2 | head -n1`
415        if [ ! -z "$URL" ];then
416                echo "$URL$EXTRA" >> $STREAMLIST
417        fi
418#URL=""
419        #"file":                "rtmp%3A%2F%2Fa3.aliez.me%2Flive%2Fstreama57449%3Ftoken%3Dd11304fabb8e64327df8427e1c2fd5d9"
420        cat $TMP/cache.hoster.$hoster.1 | sed 's/"file":/\nfound=/' | grep ^found= | cut -d'"' -f2 >$TMP/cache.hoster.$hoster.url3
421        URL=`cat $TMP/cache.hoster.$hoster.url3 | head -n1`
422
423        if [ "`echo $URL | grep rtmp | wc -l`" -eq 1 ];then
424                #new swfobject.embedSWF("http://i.aliez.me/swf/playernew.swf?0", "mediaspace", "700", "480", "9.0.115.0", false, flashvars, params);
425                cat $TMP/cache.hoster.$hoster.1 | sed 's/swfobject.embedSWF/\nfound=/' | grep ^found= | cut -d'"' -f2 >$TMP/cache.hoster.$hoster.url3.rtmp.swfurl
426                SWFURL=`cat $TMP/cache.hoster.$hoster.url3.rtmp.swfurl | head -n1`
427                URL=`echo "$URL" | sed -e 's/%3A/:/g' -e 's!%2F!/!g' -e 's!%3D!=!g' -e 's!%3F!?!g'`
428                EXTRA=" pageUrl=$REFERER"
429                if [ ! -z "$SWFURL" ];then
430                        EXTRA="$EXTRA swfUrl=$SWFURL swfVfy=1 timeout=15 live=1"
431                fi
432                if [ ! -z "$URL" ];then
433                        echo "$URL$EXTRA" >> $STREAMLIST
434                fi
435        fi
436        URL=$STREAMLIST
437
438
439        echo "$URL"
440}
441
442sport7()
443{
444        #http://sport7.tech/487b826914d11080dce4b502052b012d-live.html
445        #var videoLink = 'http://g4.securestream.sport7.tech/stream/NzYyZDUwZWNkODc5YWM5YjViY2ZkOTVhZGNjOGM1ZTc=/BTSport3.m3u8';
446
447        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
448        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
449        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
450
451        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
452        if [ -e "$STREAMLIST" ];then
453                rm -f $STREAMLIST > /dev/null 2>&1
454        fi
455
456        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
457        cat $TMP/cache.hoster.$hoster.1 | sed 's/var videoLink/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url1
458        URL=`cat $TMP/cache.hoster.$hoster.url1 | head -n1`
459        # enable httponly cookie
460        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
461
462        if [ ! -z "$URL" ];then
463                echo "$URL$EXTRA" > $STREAMLIST
464                #echo "$URL$EXTRA"
465                echo "$STREAMLIST"
466        fi
467       
468       
469#       URL=`$curlbin "$INPUT" | sed 's/var videoLink/\nfound=/' | grep ^found= | cut -d"'" -f2`
470#       REFERER=`echo "$INPUT" | sed -e 's/=/3D/g' -e 's/&/26/g'`
471#       sed 's/#HttpOnly_//g' -i /mnt/network/cookies
472#       echo "$URL|Referer=$REFERER&X-f=96.91.79.87&User-Agent=$USERAGENT"
473#       cat $STREAMLIST
474}
475
476sportstream365()
477{
478        #http://sport7.tech/487b826914d11080dce4b502052b012d-live.html
479        #var videoLink = 'http://g4.securestream.sport7.tech/stream/NzYyZDUwZWNkODc5YWM5YjViY2ZkOTVhZGNjOGM1ZTc=/BTSport3.m3u8';
480
481        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
482#       REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
483        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
484        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
485
486        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
487        if [ -e "$STREAMLIST" ];then
488                rm -f $STREAMLIST > /dev/null 2>&1
489        fi
490
491        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
492
493        #<input type="hidden" name="game" value="146875046">
494        id=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*name="game" value="([^"]+)".*/\1/p')
495        ts=$(date +%s)
496        URL="http://sportstream365.com/LiveFeed/GetGame?id=$id&partner=24"
497
498        $curlbin "$URL" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.2
499
500
501        #"VI":"1032572"
502        id=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*"VI" :"([^"]+)".*/\1/p')
503        if [ -z "$id" ];then
504                id=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*"VI":"([^"]+)".*/\1/p')
505        fi
506        #https://github.com/XvBMC/repository.xvbmc/blob/master/Dependencies/script.module.liveresolver/lib/liveresolver/resolvers/sportstream365.py
507        URL=http://93.189.57.254/edge0/xrecord/$id/prog_index.m3u8
508        # enable httponly cookie
509        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
510
511        if [ ! -z "$URL" ];then
512                echo "$URL$EXTRA" > $STREAMLIST
513                #echo "$URL$EXTRA"
514                echo "$STREAMLIST"
515        fi
516}
517
518sportsonline()
519{
520        #http://sportsonline.pw/livetv/pt-sporttv1.html
521        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
522        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
523        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
524
525        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
526        if [ -e "$STREAMLIST" ];then
527                rm -f $STREAMLIST > /dev/null 2>&1
528        fi
529
530        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
531
532        #<iframe src="http://widestream.io/embedClappr.php?live=13593" width="100%" height="100%" scrolling="no" frameborder="0" allowfullscreen="true"></iframe>
533        TMPURL=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*iframe src="([^"]+)".*/\1/p')
534
535        $curlbin "$TMPURL" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.2
536
537        #source: "http://ultra.widestream.io:8081/wideedge/1022qvk/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9MTIvOS8yMDE3IDEyOjMyOjQzIEFNJmhhc2hfdmFsdWU9ZW9WeThRL0JmaVA2dnFUQm15Ukkvdz09JnZhbGlkbWludXRlcz0yMA==",
538        TMPURL=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*source: "([^"]+)".*/\1/p')
539
540        if [ ! -z "$TMPURL" ];then
541                echo "$TMPURL$EXTRA" > $STREAMLIST
542                #echo "$URL$EXTRA"
543                echo "$STREAMLIST"
544        fi
545}
546
547assia()
548{
549        #http://assia.tv/live/gol-tv/?lang=ru
550        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
551        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
552        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
553
554        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
555        if [ -e "$STREAMLIST" ];then
556                rm -f $STREAMLIST > /dev/null 2>&1
557        fi
558
559        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
560
561        #this.videoplayer2600 = new Uppod({m:"video",uid:"videoplayer2600",comment:"",file:"http://video.assia.tv/hls/50.m3u8?md5=UD9zcmEXXgjdB92hTu9_nw&expires=1512784272",st:"uppodvideo",onReady: function(uppod){setTimeout(uppod.Pause, 60000);}});
562        TMPURL=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*file:"([^"]+)".*/\1/p' | tail -n1)
563
564        if [ ! -z "$TMPURL" ];then
565                echo "$TMPURL$EXTRA" > $STREAMLIST
566                #echo "$URL$EXTRA"
567                #http://video.assia.tv/hls/50.m3u8?md5=olw9K2ANtWtCPiL6LreprA&expires=1512783904|User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
568
569                echo "$STREAMLIST"
570        fi
571}
572
573cricfree()
574{
575        #http://cricfree.sc/update/bt2.php
576        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
577        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
578        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
579
580        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
581        if [ -e "$STREAMLIST" ];then
582                rm -f $STREAMLIST > /dev/null 2>&1
583        fi
584
585        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
586
587        #<iframe frameborder="0" marginheight="0" allowfullscreen="true" marginwidth="0" height="555" src="http://cricfree.sc/update/bt1.php" id="iframe" name="iframe_a" scrolling="no" width="620">Your Browser Do not Support Iframe</iframe>
588        TMPURL1=$(cat $TMP/cache.hoster.$hoster.1 | grep "<iframe" | grep cricfree | sed -nr 's/.*src="([^"]+)".*/\1/p')
589
590#       $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
591        $curlbin "$TMPURL1" -o $TMP/cache.hoster.$hoster.2
592
593        #<script type='text/javascript'>id='bt2i'; width='620'; height='490';</script><script type='text/javascript' src='http://hi.notkodi.science/streamgame.js'></script>
594        TMPURL2=$(cat $TMP/cache.hoster.$hoster.2 | grep "id=" | sed -nr "s/.*src='([^']+)'.*/\1/p")
595        id=$(cat $TMP/cache.hoster.$hoster.2 | grep "id=" | sed -nr "s/.*id='([^']+)'.*/\1/p")
596
597        $curlbin "$TMPURL2" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.3
598
599        #document.write('<iframe allowfullscreen width="'+width+'" height="'+height+'" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="true" src="http://veremos.date/all.php?id='+id+'&p='+p+'&c='+c+'&stretching='
600        TMPURL3=$(cat $TMP/cache.hoster.$hoster.3 | grep document.write | sed -nr 's/.*src="([^"]+)".*/\1/p')
601
602        #var stretching = 'uniform';
603        stretching=$(cat $TMP/cache.hoster.$hoster.3 | sed -nr "s/.*var stretching = '([^']+)'.*/\1/p")
604
605        #var c = '0';
606        c=$(cat $TMP/cache.hoster.$hoster.3 | sed -nr "s/.*var c = '([^']+)'.*/\1/p")
607
608        #var p = '0';
609        p=$(cat $TMP/cache.hoster.$hoster.3 | sed -nr "s/.*var p = '([^']+)'.*/\1/p")
610
611        #http://veremos.date/all.php?id=bt2i&p=0&c=0&stretching=uniform
612        TMPURL3=$(echo $TMPURL3 | sed -e "s/'+id+'/$id/" -e "s/'+p+'/$p/" -e "s/'+c+'/$c/" -e "s/'+stretching+'/$stretching/")
613
614        #$curlbin http://veremos.date/all.php?id=bt2i&p=0&c=0&stretching=uniform" --referer "http://cricfree.sc/update/bt2.php"
615        $curlbin "$TMPURL3" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.4
616
617        #<iframe allowfullscreen="" width="100%" height="100%" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" allowtransparency="true" src="http://soretin.stream/embeds/1all.php?id=256512&st=vkWS1ifC7TSE10IQKmgUEQ&e=1512815257&amp;p=0&amp;c=0&amp;stretching="></iframe>
618        TMPURL4=$(cat $TMP/cache.hoster.$hoster.4 | grep "<iframe" | sed -nr 's/.*src="([^"]+)".*/\1/p')
619
620        #$curlbin "http://soretin.stream/embeds/1all.php?id=256512&st=jOQy59wu1omnfUnNywQLDA&e=1512812987&p=0&c=0&stretching=" --referer "http://veremos.date/all.php?id=bt2i&p=0&c=0&stretching=uniform"
621        $curlbin "$TMPURL4" --referer "$TMPURL3" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.5
622
623        #return(["h","t","t","p",":","\/","\/","8","0",".","8","2",".","6","5",".","1","6","2","\/","c","a","v","s","c","a","m","p","e","o","n","\/","2","5","6","5","1","2",".","m","3","u","8","?","w","m","s","A","u","t","h","S","i","g","n","2","=","N","W","E","x","N","T","Y","3","Y","W","Y","3","N","j","h","l","Z","g","=","=","&","t","o","k","e","n","="].join("") + yUAerrrlsnutgriaaSbea.join("") + document.getElementById("aieBskfcrugtntihSa").innerHTML);
624        TMPURL=$(cat $TMP/cache.hoster.$hoster.5 | grep 'return(\["' | sed -e 's/","//g' -e 's/\\//g'| cut -d'"' -f2)
625
626        #return(["h","t","t","p",":","\/","\/","8","0",".","8","2",".","6","5",".","1","6","2","\/","c","a","v","s","c","a","m","p","e","o","n","\/","2","5","6","5","1","2",".","m","3","u","8","?","w","m","s","A","u","t","h","S","i","g","n","2","=","N","W","E","x","N","T","Y","3","Y","W","Y","3","N","j","h","l","Z","g","=","=","&","t","o","k","e","n","="].join("") + uaagraneeblAStrsyrrUi.join("") + document.getElementById("rBkacSifaguntesith").innerHTML);
627        #uaagraneeblAStrsyrrUi
628        searchtoken1=$(cat $TMP/cache.hoster.$hoster.5 | grep 'return(\["'| sed -e 's/","//g' -e 's/\\//g' | awk '{ print $3 }' | cut -d"." -f1)
629        #var uaagraneeblAStrsyrrUi = ["3Rp","UJ5","ZoY","c2V","J","jgy","X3Z","9MT","XNo","ydm","ZEp","VyX","0OC","VlP","MDI","bWU","UxM","hbH"];
630        TOKEN1=$(cat $TMP/cache.hoster.$hoster.5 | grep "var $searchtoken1" | sed -e 's/","//g' -e 's/\\//g' | cut -d'"' -f2)
631
632        #return(["h","t","t","p",":","\/","\/","8","0",".","8","2",".","6","5",".","1","6","2","\/","c","a","v","s","c","a","m","p","e","o","n","\/","2","5","6","5","1","2",".","m","3","u","8","?","w","m","s","A","u","t","h","S","i","g","n","2","=","N","W","E","x","N","T","Y","3","Y","W","Y","3","N","j","h","l","Z","g","=","=","&","t","o","k","e","n","="].join("") + uaagraneeblAStrsyrrUi.join("") + document.getElementById("rBkacSifaguntesith").innerHTML);
633        #rBkacSifaguntesith
634        searchtoken2=$(cat $TMP/cache.hoster.$hoster.5 | sed -nr 's/.*document.getElementById\("([^"]+)".*/\1/p')
635        #<span style='display:none' id=uieBiSefkngtshatrc>VZbFOMVlSL3F2lZhaE01Ta9xAWMvwQGwPZnMRY9nZ2ppVXWG</span><span style='display:none' id=suteaentirhgBfkSci>bnMWZL3XFlvAhMVpwPZ0pZ9TFSWnVGwaVMGR9Q22aOYZlEx1</span><span style='display:none' id=tSiBkaefnshuticegr>LWVMAbFZ1VaPhO3MnpF2R29ZlvSEGalwTYp9VMZQX0xZnWwG</span><span style='display:none' id=iecaSftBresutghkin>vVxZVQpVMn0ZS1Pp22nO3hwa9ZFTYRaWGFlMl9wZGEbAXLWM</span><span style='display:none' id=SnstuicrBgfitehake>Th2F1QFSWAZ9MWlPv92Vpw0LOZGwRMXbaV3ZElnMnaYpZVxG</span><span style='display:none' id=stBeiuSheiakfcrngt>bYTxap13WP2ZLlhnMF2GVXlwvWVOASaMEnQw9RVZ90GMZpZF</span><span style='display:none' id=ihenkcraesSiugBftt>wL2xZv9nMXwnZGGaAVVWWQFlZS90EMp3TlaVFP2ORbZpY1Mh</span><span style='display:none' id=hftrceSekuiiastngB>1ZXap0LlnO3VlGGZabWRnFZMMEw2xMvhZwpPVFY9VAWT92SQ</span><span style='display:none' id=inBehfgtcSautirkse>x2a2Zp3OF09XLWQZVbMMwFZnGGRpYnvPha19VEMlATVZWlwS</span><span style='display:none' id=rBkacSifaguntesith>MGZVL2wvanFha3ROWlVFQlE9PSZ2YWxpZG1pbnV0ZXM9MTAw</span><span style='display:none' id=etBirkuaiStfehgcsn>ZA1ZQGZOa39nYpVnWpS2llLwFxvawFVZb0MMPREGhXM2TVW9</span><span style='display:none' id=rshfekaguceSitnBit>pRW2TQMZaVlZ29OWFnXaFMLnV1VxZ3Y0ZGpAb9hPMSwvGEwl</span><span style='display:none' id=irBcttfehsganeSiuk>MTpXZWZb3MvnFZ2wlLFGA9nQpa2SYR9E01VxZGhwWMVOVPla</span><span style='display:none' id=skieftSBngitcuarhe>xAG1QET0WG9lnhZFPpYOa2M9lRZXnaFwVSpWLMbwVZ3MVZv2</span><span style='display:none' id=iSnkrBusfceghttiea>32EbYXWFl1Z2VZMVSGv9pZPMZLaFnaTpAh9OxGlQWMwRVw0n</span><span style='display:none' id=utrtiSfieeasBhnkcg>wZGZWxF2bPpahW9EnMV1TvYw92XlVaMpSLGMQl3OVRnA0FZZ</span><span style='display:none' id=SiisktnfeaghceuBrt>29W1LbRnVlMTZwF2WMEpw9AvGVZ0VYSnZXP3OMhxGZlQpFaa</span><span style='display:none' id=scugBteriiSehafktn>lFTMVV9W3ZhZaA1FMn9YpEvVnaxQL2XSZMpGWbwO2R0lZwPG</span><span style='display:none' id=itefaihSreuBgkcnts>Y0Eb2hQannvFZV2ZGZAaLVZlSMGlFp3V9xXPwMMTR9wO1WWp</span><span style='display:none' id=aecnhiigtuekfSrsBt>naYZSMMPbQnvE9hTVW3Ga2pwZ0GMRZwXpWFZ2llLAxOVVF19</span><span style='display:none' id=citeehgiustarnBSkf>XG29ZphlbYMLSaZ9V3PwWlQpGM12a0ZZvEFwVxWAFOMVnnRT</span><span style='display:none' id=rtcenehgusaikBSfit>3hpv2ZnVXV9lWlYxV0M9wMWPSMAnGa2ZQFROpab1ZwZETGLF</span><span style='display:none' id=csSnhfBitteguakeir>ZnXhv2GpMZP0xaAMQ1YVV9lZROWwaFnWT3M9ZlwF2pEVGLbS</span><span style='display:none' id=stigfkinrehBSaceut>p2wl0RQG3OFZhFMnaTxXV9pvZA2LMbVESWlZaVP1YZwMnG9W</span><html>
636        #MGZVL2wvanFha3ROWlVFQlE9PSZ2YWxpZG1pbnV0ZXM9MTAw
637        TOKEN2=$(cat $TMP/cache.hoster.$hoster.5 | sed "s/id=$searchtoken2/\nfoundid=/" | grep ^"foundid=" | cut -d'>' -f2 | cut -d'<' -f1)
638
639        if [ ! -z "$TMPURL" ];then
640#               echo "$TMPURL$token1$token2$EXTRA" > $STREAMLIST
641                #http://89.248.172.95/cavscampeon/256512.m3u8?wmsAuthSign2=NWExNTY3YWY3NjhlZg==&token=c2VydmVyX3RpbWU9MTUxMjgxMjM4NyZoYXNoX3ZhbHVlPVNrcndRU0Z2Mlp2QlUvbjg4N0lLQWc9PSZ2YWxpZG1pbnV0ZXM9MTAw|Referer=http%3A%2F%2Fsoretin.stream%2Fembeds%2F1all.php%3Fid%3D256512%26st%3DjOQy59wu1omnfUnNywQLDA%26e%3D1512812987%26p%3D0%26c%3D0%26stretching%3D&User-Agent=Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36&X-Requested-With=ShockwaveFlash/23.0.0.162
642
643                echo "$TMPURL$TOKEN1$TOKEN2" > $STREAMLIST
644
645                #echo "$URL$EXTRA"
646                echo "$STREAMLIST"
647        fi
648}
649
650broadcast()
651{
652        #http://assia.tv/live/gol-tv/?lang=ru
653        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
654        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
655        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
656
657        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
658        if [ -e "$STREAMLIST" ];then
659                rm -f $STREAMLIST > /dev/null 2>&1
660        fi
661
662        #$curlbin --referer "http://bro.adca.st/stream.php?id=17733&p=1&c=0&stretching=uniform&old=0" "http://bro.adca.st/token2.php"
663        $curlbin "http://bro.adca.st/token2.php" --referer "$INPUT" -o $TMP/cache.hoster.$hoster.1
664
665        #{"rumba":"ruYg748QTLGfAn2iZo3bpw&expires=1512880893"}
666        TOKEN=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*"rumba":"([^"]+)".*/\1/p' | tail -n1)
667
668        #$curlbin --referer "http://bonstreams.net" "http://bro.adca.st/stream.php?id=17733&p=1&c=0&stretching=uniform&old=0"
669        $curlbin "$INPUT" --referer "http://bonstreams.net" -o $TMP/cache.hoster.$hoster.2
670
671    #trap = "aHR0cDovL3RpZXIyLnBva2VyY29hbGl0aW9uLnB3L28xMC8xNzczMy5tM3U4P3NmPU5UazVOR0UzWXpSaE16bGpOUT09JnRva2VuPQ=
672        TRAP=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*trap = "([^"]+)".*/\1/p' | tail -n1)
673
674        echo "$TRAP" > $TMP/cache.hoster.$hoster.base64
675        TMPURL=$(base64 -d $TMP/cache.hoster.$hoster.base64)
676
677        # enable httponly cookie
678        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
679
680        if [ ! -z "$TMPURL" ];then
681                #hls://http://tier2.pokercoalition.pw/o10/17733.m3u8?sf=NTk5NGE3YzRhMzljNQ==&token=jvVfe9gic8uQ3QqCXmZemw&expires=1512879969|Referer=http%3A%2F%2Fbro.adca.st%2Fstream.php%3Fid%3D17733%26p%3D1%26c%3D0%26stretching%3Duniform%26old%3D0&User-Agent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML,%20like%20Gecko)%20Chrome%2F61.0.3163.100%20Safari%2F537.36
682                echo "$TMPURL$TOKEN$EXTRA" > $STREAMLIST
683                echo "$STREAMLIST"
684        fi
685}
686
687all()
688{
689        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
690        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
691        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
692
693        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
694        if [ -e "$STREAMLIST" ];then
695                rm -f $STREAMLIST > /dev/null 2>&1
696        fi
697
698        rm $TMP/cache.$PARSER.$INPUT.$FROM.1 > /dev/null 2>&1
699
700        $curlbin -o $TMP/cache.$PARSER.$INPUT.$FROM.1 ${1}
701        URL=`zcat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
702        if [ -z "$URL" ];then
703                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
704        fi
705        if [ -z "$URL" ];then
706                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep "text/javascript" | grep -v jQuery | sed -nr 's/.*src="([^"]+)".*/\1/p'`
707        fi
708
709#       echo $URL
710        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.2
711}
712
713
714directstream()
715{
716        echo "$INPUT"
717#       rm -f /tmp/_last_hoster_* > /dev/null 2>&1
718        echo  "$INPUT" > /tmp/.last_hoster_$hoster.log
719}
720
721youtube_dl()
722{
723#       echo "$BIN $youtubebin $INPUT" > /tmp/.last_hoster_youtube_dl.log
724#       $BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --format mp4 --restrict-filenames --ignore-errors -g "$INPUT" > /tmp/youtube_dl.streamlink.log 2>&1
725#       cat /tmp/youtube_dl.streamlink.log | tail -n1
726        mkdir $TMP > /dev/null 2>&1
727
728        if [ ! -z "$USER" ];then USER="--username $USER";fi
729        if [ ! -z "$PASS" ];then PASS="--password $PASS";fi
730
731        echo "$BIN $youtubebin $INPUT $USER $PASS" > /tmp/.last_hoster_youtube_dl.log
732
733        $BIN $youtubebin "$INPUT" $USER $PASS > $TMP/$TYPE.$hoster.$FILENAME.streamlist
734#       cat $TMP/$TYPE.$hoster.$FILENAME.streamlist
735        echo $TMP/$TYPE.$hoster.$FILENAME.streamlist
736}
737
738youtube_dlbg()
739{
740#       echo "$BIN $youtubebinbg $DEST $INPUT" > /tmp/.last_hoster_youtube_dlbg.log
741#       URL=`$BIN $CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent "$USERAGENT" --format mp4 --restrict-filenames --ignore-errors --output "$1" "$2"`
742#       echo "$URL" >> /tmp/.last_hoster_youtube_dlbg.log
743#       echo $URL
744        mkdir $TMP > /dev/null 2>&1
745
746        echo "$BIN $youtubebinbg $DEST $INPUT" > /tmp/.last_hoster_$TYPE.log
747        $BIN $youtubebinbg "$DEST" "$INPUT" >> /tmp/.last_hoster_$TYPE.log
748        cat /tmp/.last_hoster_$TYPE.log | tail -n1
749#       echo $TMP/$TYPE.$hoster.$FILENAME.streamlist
750}
751
752hlsdl()
753{
754        mkdir $TMP > /dev/null 2>&1
755
756        echo "$HLSBIN $hlsdlbg $DEST $INPUT" > /tmp/.last_hoster_$TYPE.log
757
758        REFERER=$(echo "$INPUT" | sed -nr 's/.*Referer=([^=]+)&.*/\1/p')
759        if [ -z "$REFERER" ];then
760                REFERER=$(echo "$INPUT" | sed -nr 's/.*Referer=([^=]+).*/\1/p')
761        fi
762
763        if [ ! -z "$REFERER" ];then
764                REFERER="Referer: $REFERER"
765        fi
766
767        TMPUSERAGENT=$(echo "$INPUT" | sed -nr 's/.*User-Agent=([^=]+)&.*/\1/p')
768        if [ -z "$TMPUSERAGENT" ];then
769                TMPUSERAGENT=$(echo "$INPUT" | sed -nr 's/.*User-Agent=([^=]+).*/\1/p')
770        fi
771        if [ ! -z "$TMPUSERAGENT" ];then
772                USERAGENT=$TMPUSERAGENT
773        fi
774
775        URL=$(echo "$INPUT" | tr '|' '\n' | head -n1)
776
777        echo $HLSBIN "$URL" -v -f -u "$USERAGENT" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
778        $HLSBIN "$URL" -v -f -u "$USERAGENT" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
779#       $HLSBIN "$URL" -v -u "$USERA" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
780
781}
782
783
784if [ "$TYPE" == "get" ];then
785        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
786        case $hoster in
787                ecostream) ecostream $INPUT;;
788                giga) giga $INPUT;;
789                nosvideo) nosvideo $INPUT;;
790                allmyvideos) allmyvideos $INPUT;;
791                flashx) flashx $INPUT;;
792                openload|oload) openload $INPUT;;
793                briskfile) briskfile $INPUT;;
794                videoweed|bitvid) videoweed $INPUT;;
795                vodlocker) vodlocker $INPUT;;
796                youwatch|chouhaa|ay8ou8ohth) youwatch $INPUT;;
797                thevideo|tvad|vev) thevideo $INPUT;;
798                movshare|wholecloud|vidgg) movshare $INPUT;;
799                vidto) vidto $INPUT;;
800                vidup) vidup $INPUT;;
801                vidzi) vidzi $INPUT;;
802                vivo) vivo $INPUT;;
803                goldesel|movie4k|movie4kto|kinox|kinos|kinoxto|foxx) cloudflare $INPUT;;
804                streamcloud) streamcloud $INPUT;;       
805                nowvideo) nowvideo $INPUT;;
806                divxstage|cloudtime) divxstage $INPUT;;
807                novamov|auroravid) novamov $INPUT;;
808                xvidstage) xvidstage $INPUT;;
809                waaw|netu|hqq) waaw $INPUT;;
810                vidcloud|loadvid) vidcloud $INPUT;;
811                streamango|streamcherry) streamango $INPUT;;
812                vidlox) vidlox $INPUT;;
813                redirector|googlevideo|vodcloud|google|skyfall|s4) directstream "$INPUT";;
814                aliez) aliez $INPUT;;
815                sport7) sport7 $INPUT;;
816                sportstream365) sportstream365 $INPUT;;
817                sportsonline) sportsonline $INPUT;;
818                assia) assia $INPUT;;
819                cricfree) cricfree $INPUT;;
820                adca) broadcast $INPUT;;
821#               *) all $INPUT;;
822        esac
823fi
824
825if [ "$TYPE" == "hoster" ];then
826        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
827        case $hoster in
828                kinox|kinos|kinoxto) kinox $INPUT;;
829        esac
830fi
831
832if [ "$TYPE" == "youtube_dl" ];thenthevideo.cc
833        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
834        case $hoster in
835                *) youtube_dl $INPUT $USER $PASS;;
836        esac
837fi
838
839if [ "$TYPE" == "youtube_dlbg" ];then
840        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
841        case $hoster in
842                *) youtube_dlbg $DEST $INPUT;;
843        esac
844fi
845
846if [ "$TYPE" == "hlsdl" ];then
847        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
848        case $hoster in
849                *) hlsdl $INPUT;;
850        esac
851fi
852
853if [ "$TYPE" == "cloudflare" ];then
854        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
855        case $hoster in
856                *) cloudflare $INPUT;;
857        esac
858fi
859
860curlcmd()
861{
862        $curlbin "$INPUT" "$2" "$3"
863}
864
865if [ "$TYPE" == "curl" ];then
866        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
867        case $hoster in
868                *) curlcmd "$INPUT" "$3" "$4";;
869        esac
870fi
871
872
Note: See TracBrowser for help on using the repository browser.