Changeset 40070


Ignore:
Timestamp:
Feb 22, 2017, 6:30:52 PM (3 years ago)
Author:
obi
Message:

fix cricfree

File:
1 edited

Legend:

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

    r39244 r40070  
    66SRC=$1
    77INPUT=$2
    8 FROM=$3
    9 PAGE=$4
    10 FILENAME=`echo $PAGE | tr '/' '.'`
    11 if [ -z "$PAGE" ]; then
    12         FILENAME=none
    13 fi
     8PAGE=$3
    149
    15 URL=http://cricfree.sx/
     10URL=http://cricfree.sc/
    1611PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'`
    1712NAME=CricFree
     13FILENAME="$PARSER $INPUT $PAGE"
     14FILENAME=`echo $FILENAME | tr '&' '.' | tr '/' '.' | tr '?' '.'  | tr '=' '.' | sed 's/ \+/./g' | sed 's/\.\+/./g'`
    1815
    1916#rm -rf $TMP > /dev/null 2>&1
     
    4138mainmenu()
    4239{
    43         echo "Category#$SRC $SRC category#http://atemio.dyndns.tv/mediathek/menu/category.jpg#category.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
    44         echo "$TMP/$PARSER.$INPUT.list"
     40        echo "Channels#$SRC $SRC search /#http://atemio.dyndns.tv/mediathek/menu/category.jpg#category.jpg#$NAME#0" > $TMP/$FILENAME.list
     41        echo "$TMP/$FILENAME.list"
    4542}
    4643
    47 category()
     44search()
    4845{
    49         echo "Channels#$SRC $SRC list channels /#http://atemio.dyndns.tv/mediathek/menu/category.jpg#category.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
    50         echo "$TMP/$PARSER.$INPUT.list"
    51 }
     46        rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
     47        rm $TMP/$FILENAME.* > /dev/null 2>&1
    5248
    53 list()
    54 {
    55         if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then
     49        if [ ! -e "$TMP/$FILENAME.list" ]; then
    5650                piccount=0
    5751
    58                 $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$FROM.$FILENAME.1
    59                 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
     52                $curlbin $URL/$PAGE -o $TMP/cache.$FILENAME.1
     53                cat $TMP/cache.$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.sc" | grep -v "/watch/live/" | cut -d '"' -f2 >$TMP/cache.$FILENAME.2
    6054
    6155                while read -u 3 ROUND; do
    62 
    63                         URL=`echo $ROUND | cut -d'"' -f1`
    64                         TITLE=`echo $ROUND | sed 's!http://cricfree.sx/!!' | sed 's!watch/live/!!' | sed 's!-live-stream-2!!' | sed 's!-live-stream!!' | sed 's!-in-streaming!!' | sed 's!-live-streaming-2!!' | sed 's!-live-streaming!!'`
     56                        NEWPAGE=`echo $ROUND | cut -d'"' -f1 | sed "s#$URL##"`
     57#echo NEWPAGE $NEWPAGE
     58#echo URL $URL
     59#exit
     60                        TITLE=`echo $ROUND | sed 's!http://cricfree.sc/!!' | sed 's!watch/live/!!' | sed 's!-live-stream-2!!' | sed 's!-live-stream!!' | sed 's!-in-streaming!!' | sed 's!-live-streaming-2!!' | sed 's!-live-streaming!!'`
    6561                        PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
    6662
     
    7167
    7268                        if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then
    73                                 if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then
    74                                         touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
     69                                if [ ! -e $TMP/$FILENAME.list ];then
     70                                        touch $TMP/$FILENAME.list
    7571                                fi
    7672                                piccount=$[$piccount+1]
    77                                 LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#92"
    78                                 echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list
     73#                               LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#92"
     74                                LINE="$TITLE#$SRC $SRC play '$NEWPAGE'#$PIC#$FILENAME.$piccount.jpg#$NAME#111"
     75                                echo "$LINE" >> $TMP/$FILENAME.list
    7976                        fi
    8077
    81                 done 3<$TMP/cache.$PARSER.$FROM.$FILENAME.2
    82                 rm $TMP/cache.* > /dev/null 2>&1
     78                done 3<$TMP/cache.$FILENAME.2
     79#               rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
    8380        fi
    84         echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list"
     81        echo "$TMP/$FILENAME.list"
    8582}
     83
     84play()
     85{
     86        rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
     87        rm $TMP/$FILENAME.* > /dev/null 2>&1
     88
     89        if [ ! -e "$TMP/$FILENAME.list" ]; then
     90                piccount=0
     91
     92                $curlbin $URL/$PAGE -o $TMP/cache.$FILENAME.1
     93                # <iframe frameborder="0" marginheight="0" allowfullscreen="true" marginwidth="0" height="555" src="http://cricfree.sc/update/skys4.php" id="iframe" name="iframe_a" scrolling="no" width="620">Your Browser Do not Support Iframe</iframe>
     94                NEWPAGE=`cat $TMP/cache.$FILENAME.1 | grep iframe | grep http | grep allowfullscreen | sed 's/src=/\nfound=/' | grep ^found= | cut -d'"' -f2`
     95
     96                $curlbin $NEWPAGE -o $TMP/cache.$FILENAME.2
     97#               <script type='text/javascript'>id='ss4new'; width='620'; height='490';</script><script type='text/javascript' src='http://soccerschedule.online/livegamecr.js'></script>
     98                NEWPAGE=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/src=/\nfound=/' | grep ^found= | cut -d"'" -f2`
     99                ID=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/id=/\nfound=/' | grep ^found= | cut -d"'" -f2`
     100                WIDTH=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/width=/\nfound=/' | grep ^found= | cut -d"'" -f2`
     101                HEIGHT=`cat $TMP/cache.$FILENAME.2 | grep javascript | grep id= | sed 's/height=/\nfound=/' | grep ^found= | cut -d"'" -f2`
     102
     103#echo NEWPAGE $NEWPAGE
     104#echo ID $ID
     105#echo WIDTH $WIDTH
     106#echo HEIGHT $HEIGHT
     107
     108                $curlbin --referer $URL/$PAGE $NEWPAGE -o $TMP/cache.$FILENAME.3
     109                data="text1=`cat $TMP/cache.$FILENAME.3`"
     110
     111#echo data $data
     112#               $curlbin http://ddecode.com/hexdecoder/ -o $TMP/cache.$FILENAME.3
     113                $curlbin -X POST --data "$data" http://ddecode.com/hexdecoder/ -o $TMP/cache.$FILENAME.4
     114
     115#               "http://soccerschedule.online/cricyes.php?id=ss4new&width=620&height=490&stretching="
     116                NEWPAGE="http://soccerschedule.online/cricyes.php?id=$ID&width=$WIDTH&height=$HEIGHT&stretching="
     117                $curlbin --referer  $URL/$PAGE $NEWPAGE -o $TMP/cache.$FILENAME.5
     118                REFERER=$NEWPAGE
     119
     120
     121#               <script type='text/javascript'>id='241497'; width='100%'; height='100%'; stretching='';</script><script type='text/javascript' src='http://playstream.club/cricyesplayer.js'></script>
     122                NEWPAGE=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/src=/\nfound=/' | grep ^found= | cut -d"'" -f2`
     123                ID=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/id=/\nfound=/' | grep ^found= | cut -d"'" -f2`
     124                WIDTH=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/width=/\nfound=/' | grep ^found= | cut -d"'" -f2`
     125                HEIGHT=`cat $TMP/cache.$FILENAME.5 | grep javascript | grep id= | sed 's/height=/\nfound=/' | grep ^found= | cut -d"'" -f2`
     126                $curlbin --referer $URL/$PAGE $NEWPAGE -o $TMP/cache.$FILENAME.6
     127
     128#echo NEWPAGE $NEWPAGE
     129#echo ID $ID
     130#echo WIDTH $WIDTH
     131#echo HEIGHT $HEIGHT
     132
     133                data="text1=`cat $TMP/cache.$FILENAME.6`"
     134
     135
     136#               echo data $data
     137                $curlbin -X POST --data "$data" http://ddecode.com/hexdecoder/ -o $TMP/cache.$FILENAME.7
     138
     139                NEWPAGE="http://playstream.club/cricyesplayer.php?id=$ID&width=$WIDTH&height=$HEIGHT&stretching="
     140                $curlbin --referer  $REFERER $NEWPAGE -o $TMP/cache.$FILENAME.8
     141
     142
     143#       source: "http://178.159.36.7/live/241497.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9Mi8yMi8yMDE3IDU6MDU6MTUgUE0maGFzaF92YWx1ZT1VdUhuZFlKc3N6ZU80czZmSUJ1NEd3PT0mdmFsaWRtaW51dGVzPTI4ODA=&wmsAuthSign2=NTgzZGIxMWJjMGMxOQ==",
     144                STREAMURL=`cat $TMP/cache.$FILENAME.8 | grep "source:" | cut -d'"' -f2`
     145
     146#               rm $TMP/cache.$FILENAME.* > /dev/null 2>&1
     147        fi
     148        echo "$STREAMURL"
     149}
     150
    86151
    87152case $INPUT in
    88153        init) $INPUT;;
    89154        mainmenu) $INPUT;;
    90         category) $INPUT;;
    91         list) $INPUT;;
     155        play) $INPUT;;
     156        search) $INPUT;;
    92157esac
Note: See TracChangeset for help on using the changeset viewer.