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

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

fix vidzi

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