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

Last change on this file since 39606 was 39606, checked in by obi, 6 years ago

cleanup

  • Property svn:executable set to *
File size: 4.5 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
15wgetbin="wget -q -T2"
16TMP=/tmp/localcache
17CMD=/tmp/localhoster
18
[39030]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
[39028]22export PYTHONHOME=/tmp/localhoster
23export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/tmp/localhoster/lib
[39002]24
[39030]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
[39124]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
[39030]31fi
32
[39002]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
[39037]97briskfile()
98{
99        $BIN $CMD/briskfile.py $INPUT
100}
101
[39052]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
[39219]122thevideo()
123{
124        $BIN $CMD/thevideo.py $INPUT
125}
126
[39232]127movshare()
128{
129        $BIN $CMD/movshare.py $INPUT
130}
131
132streamcloud()
133{
134        $BIN $CMD/streamcloud.py $INPUT
135}
136
[39354]137vidzi()
138{
139        $BIN $CMD/vidzi.py $INPUT
140}
141
[39355]142vivo()
143{
144        $BIN $CMD/vivo.py $INPUT
145}
146
[39358]147vidto()
148{
149        $BIN $CMD/vidto.py $INPUT
150}
151
[39387]152goldesel()
153{
154        $BIN $CMD/goldesel.py $INPUT
155}
[39358]156
[39520]157cloudflare()
158{
159        $BIN $CMD/cloudflare.py $INPUT
160}
161
[39580]162nowvideo()
163{
164        $BIN $CMD/nowvideo.py $INPUT
165}
166
[39002]167if [ "$TYPE" == "get" ];then
168        case $hoster in
169                ecostream) ecostream $INPUT;;
170                giga) giga $INPUT;;
171                vidup) vidup $INPUT;;
172                nosvideo) nosvideo $INPUT;;
173                allmyvideos) allmyvideos $INPUT;;
174                flashx) flashx $INPUT;;
175                openload) openload $INPUT;;
[39037]176                briskfile) briskfile $INPUT;;
[39052]177                bitvid) videoweed $INPUT;;
178                videoweed) videoweed $INPUT;;
179                vodlocker) vodlocker $INPUT;;
180                vodzi) vodzi $INPUT;;
181                youwatch) youwatch $INPUT;;
182                chouhaa) youwatch $INPUT;;
[39219]183                thevideo) thevideo $INPUT;;
[39232]184                movshare) movshare $INPUT;;
185                wholecloud) movshare $INPUT;;
186                vidgg) movshare $INPUT;;
[39354]187                vidzi) vidzi $INPUT;;
[39355]188                vivo) vivo $INPUT;;
[39358]189                vidto) vidto $INPUT;;
[39606]190                goldesel) cloudflare $INPUT;;
[39520]191                movie4k) cloudflare $INPUT;;
[39267]192                streamcloud1) streamcloud $INPUT;;     
[39580]193                nowvideo) nowvideo $INPUT;;
[39002]194        esac
195fi
Note: See TracBrowser for help on using the repository browser.