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

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

enable local hoster

  • Property svn:executable set to *
File size: 988 bytes
Line 
1#!/bin/sh
2# first sh box hoster for titannit mfg obi
3
4INPUT=$1
5
6hoster=`echo $INPUT | tr 'A-Z' 'a-z' | sed 's!http://!!' | sed 's!https://!!' | cut -d'/' -f1 | sed 's/www.//' | tr '.' '\n' | head -n1`
7
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
11
12ecostream()
13{
14        hosterurl=http://www.ecostream.tv
15        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`"
16        streampage=`$curlbin $hosterurl/js/ecoss.js | grep "$.post('" | grep videos | cut -d"'" -f2`
17        streamurl=$hosterurl`$curlbin -H "X-Requested-With: XMLHttpRequest" -X POST --data "$data" --referer $1 $hosterurl/$streampage | cut -d'"' -f6`
18        if [ "$streamurl" != "$hosterurl" ];then
19                echo $streamurl
20        fi
21}
22
23case $hoster in
24        ecostream) ecostream $1;;
25esac
26
27exit
Note: See TracBrowser for help on using the repository browser.