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

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

tithek update kkiste

  • Property svn:executable set to *
File size: 4.7 KB
Line 
1#!/bin/sh
2# first sh box hoster for titannit mfg obi
3
4TYPE=$1
5INPUT=$2
6
7INPUT=`echo $INPUT | sed 's!/Out/?s=!!g'`
8
9ARCH=`cat /etc/.arch`
10BOX=`cat /etc/model`
11debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
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'"
13curlbin2='curl -k -s --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
14if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
15if [ "$debuglevel" == "99" ]; then curlbin2="$curlbin2 -v"; fi
16wgetbin="wget -q -T2"
17TMP=/tmp/localcache
18CMD=/tmp/localhoster
19
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
23export PYTHONHOME=/tmp/localhoster
24export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/localhoster/lib
25
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
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
32fi
33
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`
46        if [ "$streamurl" != "$hosterurl" ];then
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
98briskfile()
99{
100        $BIN $CMD/briskfile.py $INPUT
101}
102
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
123thevideo()
124{
125        $BIN $CMD/thevideo.py $INPUT
126}
127
128movshare()
129{
130        $BIN $CMD/movshare.py $INPUT
131}
132
133streamcloud()
134{
135        $BIN $CMD/streamcloud.py $INPUT
136}
137
138vidzi()
139{
140        $BIN $CMD/vidzi.py $INPUT
141}
142
143vivo()
144{
145        $BIN $CMD/vivo.py $INPUT
146}
147
148vidto()
149{
150        $BIN $CMD/vidto.py $INPUT
151}
152
153goldesel()
154{
155        $BIN $CMD/goldesel.py $INPUT
156}
157
158cloudflare()
159{
160        $BIN $CMD/cloudflare.py $INPUT
161}
162
163nowvideo()
164{
165        $BIN $CMD/nowvideo.py $INPUT
166}
167
168divxstage()
169{
170        $BIN $CMD/divxstage.py $INPUT
171}
172
173
174if [ "$TYPE" == "get" ];then
175        case $hoster in
176                ecostream) ecostream $INPUT;;
177                giga) giga $INPUT;;
178                vidup) vidup $INPUT;;
179                nosvideo) nosvideo $INPUT;;
180                allmyvideos) allmyvideos $INPUT;;
181                flashx) flashx $INPUT;;
182                openload) openload $INPUT;;
183                briskfile) briskfile $INPUT;;
184                bitvid) videoweed $INPUT;;
185                videoweed) videoweed $INPUT;;
186                vodlocker) vodlocker $INPUT;;
187                vodzi) vodzi $INPUT;;
188                youwatch) youwatch $INPUT;;
189                chouhaa) youwatch $INPUT;;
190                thevideo) thevideo $INPUT;;
191                movshare) movshare $INPUT;;
192                wholecloud) movshare $INPUT;;
193                vidgg) movshare $INPUT;;
194                vidzi) vidzi $INPUT;;
195                vivo) vivo $INPUT;;
196                vidto) vidto $INPUT;;
197                goldesel) cloudflare $INPUT;;
198                movie4k) cloudflare $INPUT;;
199                streamcloud1) streamcloud $INPUT;;     
200                nowvideo) nowvideo $INPUT;;
201                divxstage) divxstage $INPUT;;
202                cloudtime) divxstage $INPUT;;
203        esac
204fi
Note: See TracBrowser for help on using the repository browser.