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

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

fix openload

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