Changeset 37010
- Timestamp:
- 01/31/16 06:03:27 (8 years ago)
- Location:
- titan
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localparser_secret/nbaondemand.sh
r36952 r37010 7 7 PAGE=$4 8 8 FILENAME=`echo $PAGE | tr '/' '.'` 9 if [ -z "$PAGE" ]; then 10 FILENAME=none 11 fi 9 12 10 13 ARCH=`cat /etc/.arch` 11 14 URL=http://livetv.sx 12 15 PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'` 13 NAME=NBA-On-Demand 14 16 NAME=MNT-NBA-On-Demand 17 18 curlbin="curl -k -s -v -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies --user-agent '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'" 15 19 wgetbin="wget -q -T2" 16 20 TMP=/tmp/parser 21 #TMP=/mnt/parser/tmp 17 22 #TMP=/var/usr/local/share/titan/plugins/tithek/parser/tmp 18 23 … … 20 25 mkdir $TMP > /dev/null 2>&1 21 26 22 if [ "$SRC" = "/mnt/parser"];then27 if [ `echo $SRC | grep ^"/mnt/parser" | wc -l` -gt 0 ];then 23 28 TYPE="$SRC - Shell script" 24 29 elif [ `echo $SRC | grep ^"/var/swap" | wc -l` -gt 0 ];then … … 45 50 category() 46 51 { 47 echo "Latest#$SRC $SRC listvideos latest en/videotourney/3#http://atemio.dyndns.tv/mediathek/menu/categoty.jpg#categoty.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list 48 # echo "Games#$SRC $SRC submenu games en/videotourney/3/#http://atemio.dyndns.tv/mediathek/menu/categoty.jpg#categoty.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list 49 # echo "Highlights#$SRC $SRC submenu highlights en/videotourney/3/#http://atemio.dyndns.tv/mediathek/menu/categoty.jpg#categoty.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list 52 echo "Live#$SRC $SRC live init#http://atemio.dyndns.tv/mediathek/menu/categoty.jpg#categoty.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list 53 echo "Latest#$SRC $SRC videos latest en/videotourney/3#http://atemio.dyndns.tv/mediathek/menu/categoty.jpg#categoty.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list 50 54 echo "Teams#$SRC $SRC submenu teams en/leagueresults/3/#http://atemio.dyndns.tv/mediathek/menu/categoty.jpg#categoty.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list 51 55 echo "$TMP/$PARSER.$INPUT.list" 52 56 } 53 57 54 listvideos() 55 { 56 if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then 57 touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list 58 live() 59 { 60 if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then 61 piccount=0 62 $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$FROM.$FILENAME.1 63 64 cat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | tr '\n' ' ' | sed 's!<img width=27!\nfound=!g' | grep '^found=' | grep nba.gif | grep -v nhl >$TMP/cache.$PARSER.$FROM.$FILENAME.2 65 66 while read -u 3 ROUND; do 67 URL=`echo $ROUND | sed 's!href=!\nurl=!g' | grep ^url= | cut -d'"' -f2 | head -n1` 68 TITLE=`echo $ROUND | sed "s!$URL\">!\ntitle=<!g" | grep ^title= | cut -d'<' -f2 | sed 's!–!-!g'` 69 SCORE=`echo $ROUND | sed 's! !\nscore=<!g' | grep ^score= | cut -d'<' -f2 | sed 's!–!-!g'` 70 EXTRA=`echo $ROUND | sed 's!<span class="evdesc">!\nextra=<!g' | grep ^extra= | cut -d'<' -f2 | sed 's!–!-!g'` 71 72 PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg" 73 74 if [ ! -z "$TITLE" ] && [ ! -z "$SCORE" ];then 75 TITLE="$TITLE ($SCORE)" 76 fi 77 78 if [ ! -z "$TITLE" ] && [ ! -z "$EXTRA" ];then 79 TITLE="$TITLE $EXTRA" 80 fi 81 82 TITLE=`echo $TITLE | sed 's/ //g'` 83 TITLE=`echo $TITLE | sed 's/–/-/g'` 84 TITLE=`echo $TITLE | sed 's/\n//g'` 85 86 if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then 87 if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then 88 touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list 89 fi 90 91 piccount=`expr $piccount + 1` 92 93 URL="$SRC $SRC hoster $FROM $URL" 94 95 LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#0" 96 echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list 97 fi 98 99 done 3<$TMP/cache.$PARSER.$FROM.$FILENAME.2 100 rm $TMP/cache.* > /dev/null 2>&1 101 fi 102 echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" 103 } 104 105 hoster() 106 { 107 if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then 108 piccount=0 109 $curlbin $URL/$PAGE -o $TMP/cache.$PARSER.$FROM.$FILENAME.1 110 111 cat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | tr '\n' ' ' | sed "s!show_webplayer('!\nfound=('!g" | sed 's!src="!\nsrc="!g' | grep '^found=' >$TMP/cache.$PARSER.$FROM.$FILENAME.2 112 113 while read -u 3 ROUND; do 114 URL=`echo $ROUND | sed 's!href=!\nurl=!g' | grep ^url= | cut -d'"' -f2 | head -n1` 115 TITLE=`echo $ROUND | cut -d"'" -f2` 116 EXTRA=`echo $ROUND | cut -d"'" -f4` 117 118 PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg" 119 120 if [ ! -z "$TITLE" ] && [ ! -z "$EXTRA" ];then 121 TITLE="$TITLE ($EXTRA)" 122 fi 123 124 if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then 125 if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then 126 touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list 127 fi 128 piccount=`expr $piccount + 1` 129 130 URL="$SRC $SRC videos $FROM $URL" 131 132 LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#98" 133 echo "$LINE" >> $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list 134 fi 135 136 done 3<$TMP/cache.$PARSER.$FROM.$FILENAME.2 137 rm $TMP/cache.* > /dev/null 2>&1 138 fi 139 echo "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" 140 } 141 142 videos() 143 { 144 if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then 58 145 piccount=0 59 146 $wgetbin $URL/$PAGE -O $TMP/cache.$PARSER.$FROM.$FILENAME.1 60 147 61 cat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | tr '\n' ' ' | sed 's!height=27!\nfound=!g' | grep '^found=' | grep -v LiveTV>$TMP/cache.$PARSER.$FROM.$FILENAME.2148 cat $TMP/cache.$PARSER.$FROM.$FILENAME.1 | tr '\n' ' ' | sed 's!height=27!\nfound=!g' | grep '^found=' >$TMP/cache.$PARSER.$FROM.$FILENAME.2 62 149 63 150 while read -u 3 ROUND; do … … 92 179 93 180 if [ ! -z "$TITLE" ] && [ ! -z "$URL" ] && [ "$URL" != "http://xlivetv.sx" ] && [ `cat $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list | grep "#$URL#" | wc -l` -eq 0 ];then 94 piccount=`expr $piccount + 1` 95 96 URL="$SRC $SRC playvideos $FROM $URL" 181 if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then 182 touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list 183 fi 184 piccount=`expr $piccount + 1` 185 186 URL="$SRC $SRC play $FROM $URL" 97 187 98 188 LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#0" … … 106 196 } 107 197 108 playvideos() 109 { 110 if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then 111 touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list 198 play() 199 { 200 if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then 112 201 piccount=0 113 202 $wgetbin $URL/$PAGE -O $TMP/cache.$PARSER.$FROM.$FILENAME.1 … … 121 210 PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg" 122 211 if [ ! -z "$TITLE" ] && [ ! -z "$URL" ] && [ "$URL" != "http://xlivetv.sx" ] && [ `cat $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list | grep "#$URL#" | wc -l` -eq 0 ];then 212 if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then 213 touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list 214 fi 215 123 216 piccount=`expr $piccount + 1` 124 217 LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#98" … … 135 228 { 136 229 if [ ! -e "$TMP/$PARSER.$INPUT.$FROM.$FILENAME.list" ]; then 137 touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list138 230 piccount=0 139 231 … … 143 235 144 236 while read -u 3 ROUND; do 145 URL="$SRC $SRC listvideos $FROM `echo $ROUND | cut -d'"' -f2 | sed 's!/calendar/!/video/!g'`"237 URL="$SRC $SRC videos $FROM `echo $ROUND | cut -d'"' -f2 | sed 's!/calendar/!/video/!g'`" 146 238 TITLE=`echo $ROUND | sed 's!<b>!\ntitle=<!g' | grep ^title= | cut -d'<' -f2` 147 239 PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg" 148 240 149 241 if [ ! -z "$TITLE" ] && [ ! -z "$URL" ];then 242 if [ ! -e $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list ];then 243 touch $TMP/$PARSER.$INPUT.$FROM.$FILENAME.list 244 fi 150 245 piccount=$[$piccount+1] 151 246 LINE="$TITLE#$URL#$PIC#$PARSER_$piccount.jpg#$NAME#0" … … 163 258 mainmenu) $INPUT;; 164 259 category) $INPUT;; 165 listvideos) $INPUT;; 166 playvideos) $INPUT;; 260 live) $INPUT;; 261 hoster) $INPUT;; 262 video) $INPUT;; 263 play) $INPUT;; 167 264 submenu) $INPUT;; 168 265 esac -
titan/plugins/tithek/nbaondemand.h
r37008 r37010 24 24 titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbaondemand1_tmpstr", NULL, host, path, tmpstr); 25 25 26 //<script src="//cdn.playwire.com/bolt/js/zeus/embed.js" data-config="//config.playwire.com/19004/videos/v2/4546546/zeus.json" data-width="600" data-height="343" type="text/javascript" charset="utf-8"></script> 27 //GET https://cdn.video.playwire.com/19004/videos/4546546/video-sd.mp4?hosting_id=19004 HTTP/1.1 28 29 id = string_resub("config.playwire.com/19004/videos/v2/", "/zeus.json", tmpstr, 0); 30 if(id != NULL) 26 url = string_resub("scrolling='no'src=\"", "\"", tmpstr, 0); 27 if(url != NULL) 31 28 { 32 streamurl = ostrcat("https://cdn.video.playwire.com/19004/videos/", id, 0, 0); 33 streamurl = ostrcat(streamurl, "/video-sd.mp4?hosting_id=19004", 1, 0); 34 } 29 free(tmpstr), tmpstr = NULL; 30 host = string_resub("http://", "/", link, 0); 31 tmpstr = gethttps(link, NULL, NULL, NULL, NULL, link, 1); 32 host = string_resub("http://", "/", link, 0); 33 path = string_replace_all(host, "", link, 0); 34 path = string_replace_all("http://", "", path, 1); 35 path = string_replace_all(" ", "%20", path, 1); 36 titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbaondemand1a_tmpstr", NULL, host, path, tmpstr); 37 streamurl = string_resub("video height='480' width='700' src='", "'", tmpstr, 0); 38 } 39 else if(ostrstr(tmpstr, "config.playwire.com/19004/videos/v2/") != NULL) 40 { 41 id = string_resub("config.playwire.com/19004/videos/v2/", "/zeus.json", tmpstr, 0); 42 if(id != NULL) 43 { 44 //<script src="//cdn.playwire.com/bolt/js/zeus/embed.js" data-config="//config.playwire.com/19004/videos/v2/4546546/zeus.json" data-width="600" data-height="343" type="text/javascript" charset="utf-8"></script> 45 //GET https://cdn.video.playwire.com/19004/videos/4546546/video-sd.mp4?hosting_id=19004 HTTP/1.1 46 47 streamurl = ostrcat("https://cdn.video.playwire.com/19004/videos/", id, 0, 0); 48 streamurl = ostrcat(streamurl, "/video-sd.mp4?hosting_id=19004", 1, 0); 49 } 50 } 35 51 else 36 52 {
Note: See TracChangeset
for help on using the changeset viewer.