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

Last change on this file since 39387 was 39387, checked in by obi, 5 years ago

fix goldesel

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