Ignore:
Timestamp:
02/15/16 01:46:01 (6 years ago)
Author:
obi
Message:

optimize localhoster

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/mediathek/localparser_secret/streamlive.sh

    r37136 r37152  
    2020NAME=StreamLive
    2121
    22 curlbin='curl -k -s -v -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
    23 #useragent="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"
     22debuglevel=`cat /mnt/config/titan.cfg | grep debuglevel | cut -d"=" -f2`
     23curlbin='curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies'
     24if [ "$debuglevel" == "99" ]; then curlbin="$curlbin -v"; fi
    2425
    2526wgetbin="wget -q -T2"
    26 TMP=/tmp/parser
    27 #TMP=/mnt/parser/tmp
    28 #TMP=/var/usr/local/share/titan/plugins/tithek/parser/tmp
     27TMP=/tmp/localcache
    2928
    30 #rm -rf $TMP > /dev/null 2>&1
    3129mkdir $TMP > /dev/null 2>&1
    3230
     
    5654}
    5755
    58 #category()
    59 #{
    60 #       echo "Channels#$SRC $SRC list channels /#http://atemio.dyndns.tv/mediathek/menu/categoty.jpg#categoty.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
    61 #       echo "$TMP/$PARSER.$INPUT.list"
    62 #}
    63 
    6456category()
    6557{
     
    8274                piccount=0
    8375
    84 #               $wgetbin $URL/$PAGE -O $TMP/cache.$PARSER.$FROM.$FILENAME.1
    85 #               $curlbin "http://www.streamlive.to/?p=1&q=&sort=1" -o $TMP/cache.$PARSER.$FROM.$FILENAME.1
    8676                $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$FROM.$FILENAME.1
    8777
    88 #               cat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | tr '\n' '\r' |  tr '\r' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<li class="has-sub">!\n<li class="has-sub">!g' | grep ^'<li class="has-sub">' | sed 's!href=!\n<a href=!g' | grep ^'<a href=' | grep "http://cricfree.sx" | grep -v "/watch/live/" | cut -d '"' -f2 >$TMP/cache.$PARSER.$FROM.$FILENAME.2
    8978                cat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | tr '\n' '\r' |  tr '\r' ' ' | tr '\n' ' ' | tr '\t' ' ' | sed 's/ \+/ /g' | sed 's!<a href="http://www.streamlive.to/view/!\nhttp://www.streamlive.to/view/!g' | grep ^"http://www.streamlive.to/view/" | grep -v "<strong>" | grep -v "premium_only" >$TMP/cache.$PARSER.$FROM.$FILENAME.2
    9079
Note: See TracChangeset for help on using the changeset viewer.