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

Last change on this file since 41360 was 41360, checked in by obi, 4 years ago

add streamcloud.me localparser

  • Property svn:executable set to *
File size: 17.2 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 -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
20
21ARCH=`cat /etc/.arch`
22BOX=`cat /etc/model`
23TMP=/tmp/localcache
24CMD=/tmp/localhoster
25BIN="$CMD"/bin/python."$ARCH"
26HLSBIN="$CMD"/bin/hlsdl."$ARCH"
27#USERAGENT='Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0'
28USERAGENT='Mozilla%2F5.0+%28Windows+NT+6.3%3B+rv%3A36.0%29+Gecko%2F20100101+Firefox%2F36.0'
29debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
30curlbin="curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A $USERAGENT"
31curlbin2="curl -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A $USERAGENT"
32youtubebin="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent $USERAGENT --format mp4 --restrict-filenames --ignore-errors -g"
33youtubebinbg="$CMD/lib/youtube_dl/__main__.py --no-check-certificate --cookies /mnt/network/cookies --user-agent $USERAGENT --format mp4 --restrict-filenames --ignore-errors --output"
34hlsdlbg="$HLSBIN -u $USERAGENT -o"
35
36export PYTHONHOME=/tmp/localhoster
37export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/localhoster/lib
38
39
40if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
41if [ "$debuglevel" == "99" ]; then curlbin2="$curlbin2 -v"; fi
42if [ "$debuglevel" == "99" ]; then youtubebin="$youtubebin --verbose"; fi
43
44wgetbin="wget -q -T2"
45
46if [ ! -e "/tmp/localhoster/lib/python2.7/lib-dynload" ] && [ -e /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" ];then
47#       ln -fs /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" /tmp/localhoster/lib/python2.7/lib-dynload
48        mv -f /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" /tmp/localhoster/lib/python2.7/lib-dynload
49        rm -rf /tmp/localhoster/lib/python2.7/lib-dynload.*
50fi
51if [ ! -e "/tmp/localhoster/lib/libpython2.7.so.1.0" ] && [ -e /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" ];then
52#       ln -fs /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" /tmp/localhoster/lib/libpython2.7.so.1.0
53        mv -f /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" /tmp/localhoster/lib/libpython2.7.so.1.0
54        rm -f /tmp/localhoster/lib/libpython2.7.so.1.0.*
55fi
56if [ ! -e "/tmp/localhoster/lib/libcrypto.so.1.0.0" ] && [ -e /tmp/localhoster/lib/libcrypto.so.1.0.0."$ARCH" ];then
57#       ln -fs /tmp/localhoster/lib/libcrypto.so.1.0.0."$ARCH" /tmp/localhoster/lib/libcrypto.so.1.0.0
58        mv -f /tmp/localhoster/lib/libcrypto.so.1.0.0."$ARCH" /tmp/localhoster/lib/libcrypto.so.1.0.0
59        rm -f /tmp/localhoster/lib/libcrypto.so.1.0.0.*
60fi
61if [ ! -e "/tmp/localhoster/lib/libssl.so.1.0.0" ] && [ -e /tmp/localhoster/lib/libssl.so.1.0.0."$ARCH" ];then
62#       ln -fs /tmp/localhoster/lib/libssl.so.1.0.0."$ARCH" /tmp/localhoster/lib/llibssl.so.1.0.0
63        mv -f /tmp/localhoster/lib/libssl.so.1.0.0."$ARCH" /tmp/localhoster/lib/libssl.so.1.0.0
64        rm -f /tmp/localhoster/lib/libssl.so.1.0.0.*
65fi
66
67if [ -e "$TMP/hoster.tar" ]; then rm -f $TMP/hoster.tar; fi
68if [ -e "$TMP/parser.tar" ]; then rm -f $TMP/parser.tar; fi
69
70if [ "$ARCH" == "sh4" ] && [ "$BOX" != "ufs912" ]; then
71        if [ -e "$CMD/lib/python2.7/lib-dynload.mipsel" ]; then rm -rf $CMD/lib/python2.7/lib-dynload.mipsel; fi
72        if [ -e "$CMD/lib/python2.7/lib-dynload.arm" ]; then rm -rf $CMD/lib/python2.7/lib-dynload.arm; fi
73
74        if [ -e "$CMD/lib/libpython2.7.so.1.0.mipsel" ]; then rm -rf $CMD/lib/libpython2.7.so.1.0.mipsel; fi
75        if [ -e "$CMD/lib/libpython2.7.so.1.0.arm" ]; then rm -rf $CMD/lib/libpython2.7.so.1.0.arm; fi
76
77        if [ -e "$CMD/lib/libssl.so.1.0.0.mipsel" ]; then rm -rf $CMD/lib/libssl.so.1.0.0.mipsel; fi
78        if [ -e "$CMD/lib/libssl.so.1.0.0.arm" ]; then rm -rf $CMD/lib/libssl.so.1.0.0.arm; fi
79
80        if [ -e "$CMD/lib/libcrypto.so.1.0.0.mipsel" ]; then rm -rf $CMD/lib/libcrypto.so.1.0.0.mipsel; fi
81        if [ -e "$CMD/lib/libcrypto.so.1.0.0.arm" ]; then rm -rf $CMD/lib/libcrypto.so.1.0.0.arm; fi
82fi
83
84hostercheck=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!://!\n!' | cut -d'/' -f1 | tail -n1 | tr '.' '\n' | wc -l`
85hosterline=`expr $hostercheck - 1`
86hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!://!\n!' | cut -d'/' -f1 | tail -n1 | cut -d"." -f$hosterline`
87#echo $hoster
88
89ecostream()
90{
91        hosterurl=http://www.ecostream.tv
92        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`"
93        streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2`
94        streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6`
95        if [ "`echo $streamurl | grep DOCTYPE | wc -l`" -eq 0 ] && [ "$streamurl" != "$hosterurl" ];then
96                echo $streamurl
97        fi
98}
99
100giga()
101{
102        streampage=`$curlbin $INPUT | grep "<iframe src=" | cut -d'"' -f2 | head -n1`
103        streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 1080p`
104        if [ -z "$streamurl" ];then
105                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 720p`
106        fi
107        if [ -z "$streamurl" ];then
108                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 480p`
109        fi
110        if [ -z "$streamurl" ];then
111                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 360p`
112        fi
113        if [ -z "$streamurl" ];then
114                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 240p`
115        fi
116        if [ -z "$streamurl" ];then
117                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 180p`
118        fi
119        echo $streamurl
120}
121
122vidup()
123{
124        $BIN $CMD/vidup.py $INPUT
125}
126
127nosvideo()
128{
129        $BIN $CMD/nosvideo.py $INPUT
130}
131
132allmyvideos()
133{
134        $BIN $CMD/allmyvideos.py $INPUT
135}
136
137flashx()
138{
139        $BIN $CMD/flashx.py $INPUT
140}
141
142openload()
143{
144        $BIN $CMD/openload.py $INPUT
145}
146
147briskfile()
148{
149        $BIN $CMD/briskfile.py $INPUT
150}
151
152vodlockerold()
153{
154        $BIN $CMD/vodlocker.py $INPUT
155}
156
157videoweed()
158{
159        $BIN $CMD/videoweed.py $INPUT
160}
161
162vodzi()
163{
164        $BIN $CMD/vodzi.py $INPUT
165}
166
167youwatch()
168{
169        $BIN $CMD/youwatch.py $INPUT
170}
171
172thevideo()
173{
174        $BIN $CMD/thevideo.py $INPUT
175}
176
177movshare()
178{
179        $BIN $CMD/movshare.py $INPUT
180}
181
182streamcloud()
183{
184        $BIN $CMD/streamcloud.py $INPUT
185}
186
187vidzi()
188{
189        $BIN $CMD/vidzi.py $INPUT
190}
191
192vivo()
193{
194        $BIN $CMD/vivo.py $INPUT
195}
196
197vidto()
198{
199        $BIN $CMD/vidto.py $INPUT
200}
201
202goldesel()
203{
204        $BIN $CMD/goldesel.py $INPUT
205}
206
207cloudflare()
208{
209        $BIN $CMD/cloudflare.py $INPUT
210}
211
212nowvideo()
213{
214        $BIN $CMD/nowvideo.py $INPUT
215}
216
217divxstage()
218{
219        $BIN $CMD/divxstage.py $INPUT
220}
221
222novamov()
223{
224        $BIN $CMD/novamov.py $INPUT
225}
226
227xvidstage()
228{
229        $BIN $CMD/xvidstage.py $INPUT
230}
231
232waaw()
233{
234        $BIN $CMD/waaw.py $INPUT
235}
236
237streamango()
238{
239        $BIN $CMD/streamango.py $INPUT
240}
241
242vidlox()
243{
244        $BIN $CMD/vidlox.py $INPUT
245}
246
247vodlocker()
248{
249        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
250        #http://emb.aliez.me/player/live.php?id=56180&w=700&h=480"
251        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
252        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
253
254        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
255        if [ -e "$STREAMLIST" ];then
256                rm -f $STREAMLIST > /dev/null 2>&1
257        fi
258
259#vodlocker
260#$curlbin "http://www.vodlocker.to/embed?t=Money+Monster&y=2016&lang=de&referrer=link"
261
262        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
263
264        cat $TMP/cache.hoster.$hoster.1 | grep play_container | sed -nr "s/.*href='([^']+)'.*/\1/p" >$TMP/cache.hoster.$hoster.2
265        TMPURL=`cat $TMP/cache.hoster.$hoster.2`
266        echo TMPURL $TMPURL
267
268        $curlbin "$TMPURL" -o $TMP/cache.hoster.$hoster.3
269        cat $TMP/cache.hoster.$hoster.3 | sed 's/<source src=/\nfound=/g' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url1
270        URL=`cat $TMP/cache.hoster.$hoster.url1`
271        if [ ! -z "$URL" ];then
272                echo "$URL$EXTRA" >> $STREAMLIST
273#               echo "$URL" >> $STREAMLIST
274        fi
275
276        URL=$STREAMLIST
277
278
279        echo "$URL"
280}
281
282aliezold()
283{
284        URL=`$curlbin "$INPUT" | sed 's/source:/\nsource:/' | grep ^source: | cut -d"'" -f2`
285        REFERER=`echo "$INPUT" | sed -e 's/=/3D/g' -e 's/&/26/g'`
286        echo "$URL|Referer=$REFERER&User-Agent=$USERAGENT"
287}
288
289aliez()
290{
291        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
292        #http://emb.aliez.me/player/live.php?id=56180&w=700&h=480"
293        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
294        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
295
296        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
297        if [ -e "$STREAMLIST" ];then
298                rm -f $STREAMLIST > /dev/null 2>&1
299        fi
300
301        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
302        cat $TMP/cache.hoster.$hoster.1 | sed 's/source:/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url1
303        URL=`cat $TMP/cache.hoster.$hoster.url1 | head -n1`
304        if [ ! -z "$URL" ];then
305                echo "$URL$EXTRA" >> $STREAMLIST
306        fi
307#       URL=""
308        #file:  'http://a3.aliez.me:8080/hls/streama57449/index.m3u8?st=dgw2dOq8tyFkLLBLn2ycXA',
309
310        cat $TMP/cache.hoster.$hoster.1 | sed 's/file:/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url2
311        URL=`cat $TMP/cache.hoster.$hoster.url2 | head -n1`
312        if [ ! -z "$URL" ];then
313                echo "$URL$EXTRA" >> $STREAMLIST
314        fi
315#URL=""
316        #"file":                "rtmp%3A%2F%2Fa3.aliez.me%2Flive%2Fstreama57449%3Ftoken%3Dd11304fabb8e64327df8427e1c2fd5d9"
317        cat $TMP/cache.hoster.$hoster.1 | sed 's/"file":/\nfound=/' | grep ^found= | cut -d'"' -f2 >$TMP/cache.hoster.$hoster.url3
318        URL=`cat $TMP/cache.hoster.$hoster.url3 | head -n1`
319
320        if [ "`echo $URL | grep rtmp | wc -l`" -eq 1 ];then
321                #new swfobject.embedSWF("http://i.aliez.me/swf/playernew.swf?0", "mediaspace", "700", "480", "9.0.115.0", false, flashvars, params);
322                cat $TMP/cache.hoster.$hoster.1 | sed 's/swfobject.embedSWF/\nfound=/' | grep ^found= | cut -d'"' -f2 >$TMP/cache.hoster.$hoster.url3.rtmp.swfurl
323                SWFURL=`cat $TMP/cache.hoster.$hoster.url3.rtmp.swfurl | head -n1`
324                URL=`echo "$URL" | sed -e 's/%3A/:/g' -e 's!%2F!/!g' -e 's!%3D!=!g' -e 's!%3F!?!g'`
325                EXTRA=" pageUrl=$REFERER"
326                if [ ! -z "$SWFURL" ];then
327                        EXTRA="$EXTRA swfUrl=$SWFURL swfVfy=1 timeout=15 live=1"
328                fi
329                if [ ! -z "$URL" ];then
330                        echo "$URL$EXTRA" >> $STREAMLIST
331                fi
332        fi
333        URL=$STREAMLIST
334
335
336        echo "$URL"
337}
338
339sport7()
340{
341        #http://sport7.tech/487b826914d11080dce4b502052b012d-live.html
342        #var videoLink = 'http://g4.securestream.sport7.tech/stream/NzYyZDUwZWNkODc5YWM5YjViY2ZkOTVhZGNjOGM1ZTc=/BTSport3.m3u8';
343
344        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
345        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
346        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
347
348        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
349        if [ -e "$STREAMLIST" ];then
350                rm -f $STREAMLIST > /dev/null 2>&1
351        fi
352
353        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
354        cat $TMP/cache.hoster.$hoster.1 | sed 's/var videoLink/\nfound=/' | grep ^found= | cut -d"'" -f2 >$TMP/cache.hoster.$hoster.url1
355        URL=`cat $TMP/cache.hoster.$hoster.url1 | head -n1`
356        # enable httponly cookie
357        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
358
359        if [ ! -z "$URL" ];then
360                echo "$URL$EXTRA" > $STREAMLIST
361                #echo "$URL$EXTRA"
362                echo "$STREAMLIST"
363        fi
364       
365       
366#       URL=`$curlbin "$INPUT" | sed 's/var videoLink/\nfound=/' | grep ^found= | cut -d"'" -f2`
367#       REFERER=`echo "$INPUT" | sed -e 's/=/3D/g' -e 's/&/26/g'`
368#       sed 's/#HttpOnly_//g' -i /mnt/network/cookies
369#       echo "$URL|Referer=$REFERER&X-f=96.91.79.87&User-Agent=$USERAGENT"
370#       cat $STREAMLIST
371}
372
373sportstream365()
374{
375        #http://sport7.tech/487b826914d11080dce4b502052b012d-live.html
376        #var videoLink = 'http://g4.securestream.sport7.tech/stream/NzYyZDUwZWNkODc5YWM5YjViY2ZkOTVhZGNjOGM1ZTc=/BTSport3.m3u8';
377
378        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
379#       REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
380        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
381        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
382
383        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
384        if [ -e "$STREAMLIST" ];then
385                rm -f $STREAMLIST > /dev/null 2>&1
386        fi
387
388        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.1
389
390        #<input type="hidden" name="game" value="146875046">
391        id=$(cat $TMP/cache.hoster.$hoster.1 | sed -nr 's/.*name="game" value="([^"]+)".*/\1/p')
392        ts=$(date +%s)
393        URL="http://sportstream365.com/LiveFeed/GetGame?id=$id&partner=24"
394
395        $curlbin "$URL" --referer "$REFERER" -H "X-Requested-With: ShockwaveFlash/27.0.0.187" -o $TMP/cache.hoster.$hoster.2
396
397
398        #"VI":"1032572"
399        id=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*"VI" :"([^"]+)".*/\1/p')
400        if [ -z "$id" ];then
401                id=$(cat $TMP/cache.hoster.$hoster.2 | sed -nr 's/.*"VI":"([^"]+)".*/\1/p')
402        fi
403        #https://github.com/XvBMC/repository.xvbmc/blob/master/Dependencies/script.module.liveresolver/lib/liveresolver/resolvers/sportstream365.py
404        URL=http://93.189.57.254/edge0/xrecord/$id/prog_index.m3u8
405        # enable httponly cookie
406        sed 's/#HttpOnly_//g' -i /mnt/network/cookies
407
408        if [ ! -z "$URL" ];then
409                echo "$URL$EXTRA" > $STREAMLIST
410                #echo "$URL$EXTRA"
411                echo "$STREAMLIST"
412        fi
413}
414
415
416all()
417{
418        rm -f $TMP/cache.hoster.$hoster.* > /dev/null 2>&1
419        REFERER=`echo "$INPUT" | sed -e 's/=/%3D/g' -e 's/&/%26/g'`
420        EXTRA="|Referer=$REFERER&User-Agent=$USERAGENT"
421
422        STREAMLIST="$TMP/$TYPE.$hoster.$FILENAME.streamlist"
423        if [ -e "$STREAMLIST" ];then
424                rm -f $STREAMLIST > /dev/null 2>&1
425        fi
426
427        rm $TMP/cache.$PARSER.$INPUT.$FROM.1 > /dev/null 2>&1
428
429        $curlbin -o $TMP/cache.$PARSER.$INPUT.$FROM.1 ${1}
430        URL=`zcat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
431        if [ -z "$URL" ];then
432                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep iframe | sed -nr 's/.*src="([^"]+)".*/\1/p'`
433        fi
434        if [ -z "$URL" ];then
435                URL=`cat $TMP/cache.$PARSER.$INPUT.$FROM.1 | grep "text/javascript" | grep -v jQuery | sed -nr 's/.*src="([^"]+)".*/\1/p'`
436        fi
437
438#       echo $URL
439        $curlbin "$INPUT" -o $TMP/cache.hoster.$hoster.2
440}
441
442
443directstream()
444{
445        echo "$INPUT"
446#       rm -f /tmp/_last_hoster_* > /dev/null 2>&1
447        echo  "$INPUT" > /tmp/.last_hoster_$hoster.log
448}
449
450youtube_dl()
451{
452#       echo "$BIN $youtubebin $INPUT" > /tmp/.last_hoster_youtube_dl.log
453#       $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
454#       cat /tmp/youtube_dl.streamlink.log | tail -n1
455        mkdir $TMP > /dev/null 2>&1
456
457        echo "$BIN $youtubebin $INPUT --username $USER --password $PASS" > /tmp/.last_hoster_youtube_dl.log
458
459        $BIN $youtubebin "$INPUT" --username "$USER" --password "$PASS" > $TMP/$TYPE.$hoster.$FILENAME.streamlist
460        cat $TMP/$TYPE.$hoster.$FILENAME.streamlist
461}
462
463youtube_dlbg()
464{
465#       echo "$BIN $youtubebinbg $DEST $INPUT" > /tmp/.last_hoster_youtube_dlbg.log
466#       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"`
467#       echo "$URL" >> /tmp/.last_hoster_youtube_dlbg.log
468#       echo $URL
469        mkdir $TMP > /dev/null 2>&1
470
471        echo "$BIN $youtubebinbg $DEST $INPUT" > /tmp/.last_hoster_$TYPE.log
472        $BIN $youtubebinbg "$DEST" "$INPUT" >> /tmp/.last_hoster_$TYPE.log
473#       echo $TMP/$TYPE.$hoster.$FILENAME.streamlist
474}
475
476hlsdl()
477{
478        mkdir $TMP > /dev/null 2>&1
479
480        echo "$HLSBIN $hlsdlbg $DEST $INPUT" > /tmp/.last_hoster_$TYPE.log
481
482        REFERER=$(echo "$INPUT" | sed -nr 's/.*Referer=([^=]+)&.*/\1/p')
483        if [ -z "$REFERER" ];then
484                REFERER=$(echo "$INPUT" | sed -nr 's/.*Referer=([^=]+).*/\1/p')
485        fi
486
487        if [ ! -z "$REFERER" ];then
488                REFERER="Referer: $REFERER"
489        fi
490
491        TMPUSERAGENT=$(echo "$INPUT" | sed -nr 's/.*User-Agent=([^=]+)&.*/\1/p')
492        if [ -z "$TMPUSERAGENT" ];then
493                TMPUSERAGENT=$(echo "$INPUT" | sed -nr 's/.*User-Agent=([^=]+).*/\1/p')
494        fi
495        if [ ! -z "$TMPUSERAGENT" ];then
496                USERAGENT=$TMPUSERAGENT
497        fi
498
499        URL=$(echo "$INPUT" | tr '|' '\n' | head -n1)
500
501        echo $HLSBIN "$URL" -v -f -u "$USERAGENT" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
502        $HLSBIN "$URL" -v -f -u "$USERAGENT" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
503#       $HLSBIN "$URL" -v -u "$USERA" -h "$REFERER" -o "$DEST" >> /tmp/.last_hoster_$TYPE.log
504
505}
506
507
508if [ "$TYPE" == "get" ];then
509        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
510        case $hoster in
511                ecostream) ecostream $INPUT;;
512                giga) giga $INPUT;;
513                nosvideo) nosvideo $INPUT;;
514                allmyvideos) allmyvideos $INPUT;;
515                flashx) flashx $INPUT;;
516                openload|oload) openload $INPUT;;
517                briskfile) briskfile $INPUT;;
518                videoweed|bitvid) videoweed $INPUT;;
519                vodlocker) vodlocker $INPUT;;
520                youwatch|chouhaa|ay8ou8ohth) youwatch $INPUT;;
521                thevideo) thevideo $INPUT;;
522                movshare|wholecloud|vidgg) movshare $INPUT;;
523                vidto) vidto $INPUT;;
524                vidup) vidup $INPUT;;
525                vidzi) vidzi $INPUT;;
526                vivo) vivo $INPUT;;
527                goldesel|movie4k) cloudflare $INPUT;;
528                streamcloud1) streamcloud $INPUT;;     
529                nowvideo) nowvideo $INPUT;;
530                divxstage|cloudtime) divxstage $INPUT;;
531                novamov|auroravid) novamov $INPUT;;
532                xvidstage) xvidstage $INPUT;;
533                waaw|netu|hqq) waaw $INPUT;;
534                streamango|streamcherry) streamango $INPUT;;
535                vidlox) vidlox $INPUT;;
536                redirector|googlevideo|vodcloud|google) directstream "$INPUT";;
537                aliez) aliez $INPUT;;
538                sport7) sport7 $INPUT;;
539                sportstream365) sportstream365 $INPUT;;
540                *) all $INPUT;;
541
542        esac
543fi
544
545if [ "$TYPE" == "youtube_dl" ];then
546        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
547        case $hoster in
548                *) youtube_dl $INPUT $USER $PASS;;
549        esac
550fi
551
552if [ "$TYPE" == "youtube_dlbg" ];then
553        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
554        case $hoster in
555                *) youtube_dlbg $DEST $INPUT;;
556        esac
557fi
558
559if [ "$TYPE" == "hlsdl" ];then
560        echo  "$INPUT" > /tmp/.last_hoster_$TYPE_$hoster.log
561        case $hoster in
562                *) hlsdl $INPUT;;
563        esac
564fi
Note: See TracBrowser for help on using the repository browser.