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

Last change on this file since 38996 was 38996, checked in by obi, 8 years ago

[tithek] add local python hoster openload / allmyvideos / nosvideo / vidup

  • Property svn:executable set to *
File size: 2.4 KB
Line 
1#!/bin/sh
2# first sh box hoster for titannit mfg obi
3
4TYPE=$1
5INPUT=$2
6
7ARCH=`cat /etc/.arch`
8debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
9curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
10if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
11wgetbin="wget -q -T2"
12TMP=/tmp/localcache
13CMD=/tmp/localhoster
14
15hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!http://!!' | sed 's!https://!!' | cut -d'/' -f1 | sed 's/www.//' | tr '.' '\n' | head -n1`
16
17debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
18curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
19if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
20
21ecostream()
22{
23        hosterurl=http://www.ecostream.tv
24        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`"
25        streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2`
26        streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $INPUT $hosterurl/$streampage | cut -d'"' -f6`
27        if [ "$streamurl" != "$hosterurl" ];then
28                echo $streamurl
29        fi
30}
31
32giga()
33{
34        streampage=`$curlbin $INPUT | grep "<iframe src=" | cut -d'"' -f2 | head -n1`
35        streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 1080p`
36        if [ -z "$streamurl" ];then
37                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 720p`
38        fi
39        if [ -z "$streamurl" ];then
40                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 480p`
41        fi
42        if [ -z "$streamurl" ];then
43                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 360p`
44        fi
45        if [ -z "$streamurl" ];then
46                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 240p`
47        fi
48        if [ -z "$streamurl" ];then
49                streamurl=`$curlbin $streampage | grep '{file:' | cut -d'"' -f2 | grep 180p`
50        fi
51        echo $streamurl
52}
53
54vidup()
55{
56        python $CMD/vidup.py $INPUT
57}
58
59nosvideo()
60{
61        python $CMD/nosvideo.py $INPUT
62}
63
64allmyvideos()
65{
66        python $CMD/allmyvideos.py $INPUT
67}
68
69flashx()
70{
71        python $CMD/flashx.py $INPUT
72}
73
74openload()
75{
76        python $CMD/openload.py $INPUT
77}
78
79if [ "$TYPE" == "get" ];then
80        case $hoster in
81                ecostream) ecostream $INPUT;;
82                giga) giga $INPUT;;
83                vidup) vidup $INPUT;;
84                nosvideo) nosvideo $INPUT;;
85                allmyvideos) allmyvideos $INPUT;;
86                flashx) flashx $INPUT;;
87                openload) openload $INPUT;;
88        esac
89fi
Note: See TracBrowser for help on using the repository browser.