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

Last change on this file since 42636 was 42636, checked in by obi, 15 months ago

tithek hoster add i386 support

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