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

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

tithek fix nba full streams, user needed a https://vk.com acc and add to tithek_settings

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