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

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

test global file

  • Property svn:executable set to *
File size: 1.2 KB
RevLine 
[37148]1#!/bin/sh
2# first sh box hoster for titannit mfg obi
3
4INPUT=$1
5
[37154]6ARCH=`cat /etc/.arch`
7debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
8curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
9if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
10wgetbin="wget -q -T2"
11TMP=/tmp/localcache
12
[37148]13hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!http://!!' | sed 's!https://!!' | cut -d'/' -f1 | sed 's/www.//' | tr '.' '\n' | head -n1`
14
15debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
16curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
17if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
18
19ecostream()
20{
21        hosterurl=http://www.ecostream.tv
22        data="tpm=`$curlbin $1 | grep footerhash | cut -d"'" -f2``$curlbin $1 | grep superslots | cut -d"'" -f2`&id=`$curlbin $1 | grep data-id | cut -d'"' -f4`"
23        streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2`
24        streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $1 $hosterurl/$streampage | cut -d'"' -f6`
25        if [ "$streamurl" != "$hosterurl" ];then
26                echo $streamurl
27        fi
28}
29
30case $hoster in
31        ecostream) ecostream $1;;
32esac
33
34exit
Note: See TracBrowser for help on using the repository browser.