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

Last change on this file since 40051 was 40051, checked in by obi, 7 years ago

[tithek] add meinkin

  • Property svn:executable set to *
File size: 4.9 KB
RevLine 
[39002]1#!/bin/sh
2# first sh box hoster for titannit mfg obi
3
4TYPE=$1
5INPUT=$2
6
[39362]7INPUT=`echo $INPUT | sed 's!/Out/?s=!!g'`
8
[39002]9ARCH=`cat /etc/.arch`
[39030]10BOX=`cat /etc/model`
[39002]11debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
[39427]12curlbin="curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.4.7.3000 Chrome/30.0.1599.101 Safari/537.36'"
[39391]13curlbin2='curl -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
[39002]14if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
[39622]15if [ "$debuglevel" == "99" ]; then curlbin2="$curlbin2 -v"; fi
[39002]16wgetbin="wget -q -T2"
17TMP=/tmp/localcache
18CMD=/tmp/localhoster
19
[39030]20BIN="$CMD"/bin/python."$ARCH"
21ln -fs /tmp/localhoster/lib/python2.7/lib-dynload."$ARCH" /tmp/localhoster/lib/python2.7/lib-dynload
22ln -fs /tmp/localhoster/lib/libpython2.7.so.1.0."$ARCH" /tmp/localhoster/lib/libpython2.7.so.1.0
[39028]23export PYTHONHOME=/tmp/localhoster
24export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/localhoster/lib
[39002]25
[39030]26if [ -e "$TMP/hoster.tar" ]; then rm -f $TMP/hoster.tar; fi
27if [ -e "$TMP/parser.tar" ]; then rm -f $TMP/parser.tar; fi
28
29if [ "$ARCH" == "sh4" ] && [ "$BOX" != "ufs912" ]; then
[39124]30        if [ -e "$CMD/lib/python2.7/lib-dynload.mipsel" ]; then rm -rf $CMD/lib/python2.7/lib-dynload.mipsel; fi
31        if [ -e "$CMD/lib/libpython2.7.so.1.0.mipsel" ]; then rm -rf $CMD/lib/libpython2.7.so.1.0.mipsel; fi
[39030]32fi
33
[39002]34hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!http://!!' | sed 's!https://!!' | cut -d'/' -f1 | sed 's/www.//' | tr '.' '\n' | head -n1`
35
36debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
37curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
38if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
39
40ecostream()
41{
42        hosterurl=http://www.ecostream.tv
43        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`"
44        streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2`
45        streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6`
[39633]46        if [ "`echo $streamurl | grep DOCTYPE | wc -l`" -eq 0 ] && [ "$streamurl" != "$hosterurl" ];then
[39002]47                echo $streamurl
48        fi
49}
50
51giga()
52{
53        streampage=`$curlbin $INPUT | grep "<iframe src=" | cut -d'"' -f2 | head -n1`
54        streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 1080p`
55        if [ -z "$streamurl" ];then
56                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 720p`
57        fi
58        if [ -z "$streamurl" ];then
59                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 480p`
60        fi
61        if [ -z "$streamurl" ];then
62                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 360p`
63        fi
64        if [ -z "$streamurl" ];then
65                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 240p`
66        fi
67        if [ -z "$streamurl" ];then
68                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 180p`
69        fi
70        echo $streamurl
71}
72
73vidup()
74{
75        $BIN $CMD/vidup.py $INPUT
76}
77
78nosvideo()
79{
80        $BIN $CMD/nosvideo.py $INPUT
81}
82
83allmyvideos()
84{
85        $BIN $CMD/allmyvideos.py $INPUT
86}
87
88flashx()
89{
90        $BIN $CMD/flashx.py $INPUT
91}
92
93openload()
94{
95        $BIN $CMD/openload.py $INPUT
96}
97
[39037]98briskfile()
99{
100        $BIN $CMD/briskfile.py $INPUT
101}
102
[39052]103vodlocker()
104{
105        $BIN $CMD/vodlocker.py $INPUT
106}
107
108videoweed()
109{
110        $BIN $CMD/videoweed.py $INPUT
111}
112
113vodzi()
114{
115        $BIN $CMD/vodzi.py $INPUT
116}
117
118youwatch()
119{
120        $BIN $CMD/youwatch.py $INPUT
121}
122
[39219]123thevideo()
124{
125        $BIN $CMD/thevideo.py $INPUT
126}
127
[39232]128movshare()
129{
130        $BIN $CMD/movshare.py $INPUT
131}
132
133streamcloud()
134{
135        $BIN $CMD/streamcloud.py $INPUT
136}
137
[39354]138vidzi()
139{
140        $BIN $CMD/vidzi.py $INPUT
141}
142
[39355]143vivo()
144{
145        $BIN $CMD/vivo.py $INPUT
146}
147
[39358]148vidto()
149{
150        $BIN $CMD/vidto.py $INPUT
151}
152
[39387]153goldesel()
154{
155        $BIN $CMD/goldesel.py $INPUT
156}
[39358]157
[39520]158cloudflare()
159{
160        $BIN $CMD/cloudflare.py $INPUT
161}
162
[39580]163nowvideo()
164{
165        $BIN $CMD/nowvideo.py $INPUT
166}
167
[39608]168divxstage()
169{
170        $BIN $CMD/divxstage.py $INPUT
171}
172
[39650]173novamov()
174{
175        $BIN $CMD/novamov.py $INPUT
176}
[39608]177
[40036]178xvidstage()
179{
180        $BIN $CMD/xvidstage.py $INPUT
181}
182
[40051]183googlevideo()
184{
185        echo "$INPUT"
186}
187
[39002]188if [ "$TYPE" == "get" ];then
189        case $hoster in
190                ecostream) ecostream $INPUT;;
191                giga) giga $INPUT;;
192                nosvideo) nosvideo $INPUT;;
193                allmyvideos) allmyvideos $INPUT;;
194                flashx) flashx $INPUT;;
195                openload) openload $INPUT;;
[39037]196                briskfile) briskfile $INPUT;;
[39650]197                videoweed|bitvid) videoweed $INPUT;;
[39052]198                vodlocker) vodlocker $INPUT;;
[39652]199                youwatch|chouhaa|ay8ou8ohth) youwatch $INPUT;;
[39219]200                thevideo) thevideo $INPUT;;
[39650]201                movshare|wholecloud|vidgg) movshare $INPUT;;
202                vidto) vidto $INPUT;;
203                vidup) vidup $INPUT;;
[39354]204                vidzi) vidzi $INPUT;;
[39355]205                vivo) vivo $INPUT;;
[39650]206                goldesel|movie4k) cloudflare $INPUT;;
[39267]207                streamcloud1) streamcloud $INPUT;;     
[39580]208                nowvideo) nowvideo $INPUT;;
[39650]209                divxstage|cloudtime) divxstage $INPUT;;
210                novamov|auroravid) novamov $INPUT;;
[40038]211                xvidstage) xvidstage $INPUT;;
[40051]212                redirector|googlevideo) googlevideo "$INPUT";;
[39002]213        esac
214fi
Note: See TracBrowser for help on using the repository browser.