#!/bin/sh # first sh box parser for titannit mfg obi . /tmp/localhoster/hoster.sh SRC=$1 INPUT=$2 PAGE=$3 NEXT=$4 PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'` FILENAME="`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'` $INPUT $PAGE $NEXT" FILENAME="`echo $FILENAME | sed -e 's/\&\+/./g' -e 's#\/\+#.#g' -e 's/\?\+/./g' -e 's/;\+/./g' -e 's/=\+/./g' -e 's/ \+/./g' -e 's/\.\+/./g'`" PICNAME=`echo $FILENAME` if [ -z "$FILENAME" ]; then FILENAME=none fi URL=http://livetv.sx #PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'` NAME=Sports-On-Demand #rm -rf $TMP > /dev/null 2>&1 mkdir $TMP > /dev/null 2>&1 if [ `echo $SRC | grep ^"/mnt/parser" | wc -l` -gt 0 ];then TYPE="$SRC - Shell script" elif [ `echo $SRC | grep ^"/var/swap" | wc -l` -gt 0 ];then TYPE="Swap - Shell script" elif [ `echo $SRC | grep ^"/mnt/swapextensions" | wc -l` -gt 0 ];then TYPE="Mnt - Shell script" else TYPE="Flash - Shell script" fi init() { rm -f /mnt/network/cookies > /dev/null 2>&1 rm -rf $TMP > /dev/null 2>&1 echo "$NAME ($TYPE)#$SRC $SRC mainmenu#http://atemio.dyndns.tv/mediathek/menu/$PARSER.jpg#$PARSER.jpg#TiThek#0" } mainmenu() { if [ -e "$TMP/$PARSER.livelist..sportsondemand.livelist.de.list" ] ; then rm "$TMP/$PARSER.livelist..sportsondemand.livelist.de.list" fi # if [ -e /etc/.beta ];then echo "Live Sports#$SRC $SRC livelist de#http://atemio.dyndns.tv/mediathek/menu/livesports.jpg#livesports.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list echo "Basketball#$SRC $SRC basketball#http://atemio.dyndns.tv/mediathek/menu/basketball.jpg#basketball.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list # else # echo "Basketball#$SRC $SRC basketball#http://atemio.dyndns.tv/mediathek/menu/basketball.jpg#basketball.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list # fi echo "Ice Hockey#$SRC $SRC icehockey#http://atemio.dyndns.tv/mediathek/menu/icehockey.jpg#icehockey.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Fussball#$SRC $SRC fussball#http://atemio.dyndns.tv/mediathek/menu/fussball.jpg#fussball.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Handball#$SRC $SRC handball#http://atemio.dyndns.tv/mediathek/menu/handball.jpg#handball.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Football#$SRC $SRC football#http://atemio.dyndns.tv/mediathek/menu/football.jpg#football.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "$TMP/$PARSER.$INPUT.list" } basketball() { echo "NBA (Latest)#$SRC $SRC videos enx/videotourney/3#http://atemio.dyndns.tv/mediathek/menu/nba.latest.jpg#nba.latest.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list echo "NBA (Teams)#$SRC $SRC submenu enx/leagueresults/3/#http://atemio.dyndns.tv/mediathek/menu/nba.teams.jpg#nba.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "NBA (Sorted Date)#$SRC $SRC year enx/videotourney/3/#http://atemio.dyndns.tv/mediathek/menu/nba.date.jpg#nba.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "German Bundesliga (Latest)#$SRC $SRC videos enx/videotourney/421#http://atemio.dyndns.tv/mediathek/menu/german.bundesliga.latest.jpg#german.bundesliga.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "German Bundesliga (Teams)#$SRC $SRC submenu enx/leagueresults/421/#http://atemio.dyndns.tv/mediathek/menu/german.bundesliga.teams.jpg#german.bundesliga.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "German Bundesliga (Sorted Date)#$SRC $SRC year enx/videotourney/421/#http://atemio.dyndns.tv/mediathek/menu/german.bundesliga.date.jpg#german.bundesliga.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Italian Lega Basket (Latest)#$SRC $SRC videos enx/videotourney/668#http://atemio.dyndns.tv/mediathek/menu/italian.lega.basket.latest.jpg#italian.lega.basket.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Italian Lega Basket (Teams)#$SRC $SRC submenu enx/leagueresults/668/#http://atemio.dyndns.tv/mediathek/menu/italian.lega.basket.teams.jpg#italian.lega.basket.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Italian Lega Basket (Sorted Date)#$SRC $SRC year enx/videotourney/668/#http://atemio.dyndns.tv/mediathek/menu/italian.lega.basket.date.jpg#italian.lega.basket.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "European Championship (Latest)#$SRC $SRC videos enx/videotourney/282#http://atemio.dyndns.tv/mediathek/menu/european.championship.latest.jpg#european.championship.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "European Championship (Teams)#$SRC $SRC submenu enx/leagueresults/282/#http://atemio.dyndns.tv/mediathek/menu/european.championship.teams.jpg#european.championship.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "European Championship (Sorted Date)#$SRC $SRC year enx/videotourney/282/#http://atemio.dyndns.tv/mediathek/menu/european.championship.date.jpg#european.championship.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Euroleague (Latest)#$SRC $SRC videos enx/videotourney/41#http://atemio.dyndns.tv/mediathek/menu/euroleague.latest.jpg#euroleague.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Euroleague (Teams)#$SRC $SRC submenu enx/leagueresults/41/#http://atemio.dyndns.tv/mediathek/menu/euroleague.teams.jpg#euroleague.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Euroleague (Sorted Date)#$SRC $SRC year enx/videotourney/41/#http://atemio.dyndns.tv/mediathek/menu/euroleague.date.jpg#euroleague.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "$TMP/$PARSER.$INPUT.list" } football() { echo "NFL (Latest)#$SRC $SRC videos enx/videotourney/142#http://atemio.dyndns.tv/mediathek/menu/nfl.latest.jpg#nfl.latest.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list echo "NFL (Teams)#$SRC $SRC submenu enx/leagueresults/142/#http://atemio.dyndns.tv/mediathek/menu/nfl.teams.jpg#nfl.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "NFL (Sorted Date)#$SRC $SRC year enx/videotourney/142/#http://atemio.dyndns.tv/mediathek/menu/nfl.date.jpg#nfl.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "$TMP/$PARSER.$INPUT.list" } handball() { echo "Women. Champions League (Latest)#$SRC $SRC videos enx/videotourney/1249#http://atemio.dyndns.tv/mediathek/menu/women.champions.league.latest.jpg#women.champions.league.latest.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list echo "Women. Champions League (Teams)#$SRC $SRC submenu enx/leagueresults/1249/#http://atemio.dyndns.tv/mediathek/menu/women.champions.league.teams.jpg#women.champions.league.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Women. Champions League (Sorted Date)#$SRC $SRC year enx/videotourney/1249/#http://atemio.dyndns.tv/mediathek/menu/women.champions.league.date.jpg#women.champions.league.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "$TMP/$PARSER.$INPUT.list" } icehockey() { echo "NHL (Latest)#$SRC $SRC videos enx/videotourney/2#http://atemio.dyndns.tv/mediathek/menu/nhl.latest.jpg#nhl.latest.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list echo "NHL (Teams)#$SRC $SRC submenu enx/leagueresults/2/#http://atemio.dyndns.tv/mediathek/menu/nhl.teams.jpg#nhl.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "NHL (Sorted Date)#$SRC $SRC year enx/videotourney/2/#http://atemio.dyndns.tv/mediathek/menu/nhl.date.jpg#nhl.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Champions League (Latest)#$SRC $SRC videos enx/videotourney/191#http://atemio.dyndns.tv/mediathek/menu/champions.league.latest.jpg#champions.league.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Champions League (Teams)#$SRC $SRC submenu enx/leagueresults/191/#http://atemio.dyndns.tv/mediathek/menu/champions.league.teams.jpg#champions.league.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Champions League (Sorted Date)#$SRC $SRC year enx/videotourney/191/#http://atemio.dyndns.tv/mediathek/menu/champions.league.date.jpg#champions.league.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "$TMP/$PARSER.$INPUT.list" } fussball() { echo "1. Bundesliga (Latest)#$SRC $SRC videos enx/videotourney/36#http://atemio.dyndns.tv/mediathek/menu/dfb1.latest.jpg#dfb1.latest.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list echo "1. Bundesliga (Teams)#$SRC $SRC submenu enx/leagueresults/36/#http://atemio.dyndns.tv/mediathek/menu/dfb1.teams.jpg#dfb1.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "1. Bundesliga (Sorted Date)#$SRC $SRC year enx/videotourney/36/#http://atemio.dyndns.tv/mediathek/menu/dfb1.date.jpg#dfb1.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "2. Bundesliga (Latest)#$SRC $SRC videos enx/videotourney/31#http://atemio.dyndns.tv/mediathek/menu/dfb2.latest.jpg#dfb2.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "2. Bundesliga (Teams)#$SRC $SRC submenu enx/leagueresults/31/#http://atemio.dyndns.tv/mediathek/menu/dfb2.teams.jpg#dfb2.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "2. Bundesliga (Sorted Date)#$SRC $SRC year enx/videotourney/31/#http://atemio.dyndns.tv/mediathek/menu/dfb2.date.jpg#dfb2.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "3. Bundesliga (Latest)#$SRC $SRC videos enx/videotourney/135#http://atemio.dyndns.tv/mediathek/menu/dfb3.latest.jpg#dfb3.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "3. Bundesliga (Teams)#$SRC $SRC submenu enx/leagueresults/135/#http://atemio.dyndns.tv/mediathek/menu/dfb3.teams.jpg#dfb3.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "3. Bundesliga (Sorted Date)#$SRC $SRC year enx/videotourney/135/#http://atemio.dyndns.tv/mediathek/menu/dfb3.date.jpg#dfb3.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Italian Serie A (Latest)#$SRC $SRC videos enx/videotourney/11#http://atemio.dyndns.tv/mediathek/menu/isa.latest.jpg#isa.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Italian Serie A (Teams)#$SRC $SRC submenu enx/leagueresults/11/#http://atemio.dyndns.tv/mediathek/menu/isa.teams.jpg#isa.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Italian Serie A (Sorted Date)#$SRC $SRC year enx/videotourney/11/#http://atemio.dyndns.tv/mediathek/menu/isa.date.jpg#isa.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "English Premier League (Latest)#$SRC $SRC videos enx/videotourney/1#http://atemio.dyndns.tv/mediathek/menu/epl.latest.jpg#epl.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "English Premier League (Teams)#$SRC $SRC submenu enx/leagueresults/1/#http://atemio.dyndns.tv/mediathek/menu/epl.teams.jpg#epl.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "English Premier League (Sorted Date)#$SRC $SRC year enx/videotourney/1/#http://atemio.dyndns.tv/mediathek/menu/epl.date.jpg#epl.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Europa League (Latest)#$SRC $SRC videos enx/videotourney/265#http://atemio.dyndns.tv/mediathek/menu/el.latest.jpg#el.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Europa League (Teams)#$SRC $SRC submenu enx/leagueresults/265/#http://atemio.dyndns.tv/mediathek/menu/el.teams.jpg#el.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Europa League (Sorted Date)#$SRC $SRC year enx/videotourney/265/#http://atemio.dyndns.tv/mediathek/menu/el.date.jpg#el.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Champions League (Latest)#$SRC $SRC videos enx/videotourney/7#http://atemio.dyndns.tv/mediathek/menu/champions.league.latest.jpg#champions.league.latest.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Champions League (Teams)#$SRC $SRC submenu enx/leagueresults/7/#http://atemio.dyndns.tv/mediathek/menu/champions.league.teams.jpg#champions.league.teams.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "Champions League (Sorted Date)#$SRC $SRC year enx/videotourney/7/#http://atemio.dyndns.tv/mediathek/menu/champions.league.date.jpg#champions.league.date.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list echo "$TMP/$PARSER.$INPUT.list" } year() { rm $TMP/$PARSER.$INPUT.list > /dev/null 2>&1 if [ ! -e "/tmp/tithek/$PARSER.$INPUT.list" ]; then tags="" tagcount=`date +"%Y"` i=2008 until [ "$i" -gt "$tagcount" ] do # echo "$i#$SRC $SRC month enx/videotourney/3/$i#http://atemio.dyndns.tv/mediathek/menu/$i.jpg#$i.jpg#$NAME#0" | sort -r >> $TMP/$PARSER.$INPUT.list echo "$i#$SRC $SRC month $PAGE$i#http://atemio.dyndns.tv/mediathek/menu/$i.jpg#$i.jpg#$NAME#0" | sort -r >> $TMP/$PARSER.$INPUT.list i=`expr $i + 1` done fi echo "$TMP/$PARSER.$INPUT.list" } month() { rm $TMP/$PARSER.$INPUT.list > /dev/null 2>&1 if [ ! -e "/tmp/tithek/$PARSER.$INPUT.list" ]; then tags="" usedyear=`echo $PAGE | tr '/' '\n' | tail -n1` curyear=`date +"%Y"` if [ "$usedyear" == "$curyear" ];then tagcount=`date +"%m"` else tagcount=12 fi i=1 until [ "$i" -gt "$tagcount" ] do echo "$i / $usedyear#$SRC $SRC videos $PAGE$i#http://atemio.dyndns.tv/mediathek/menu/$i.jpg#$i.jpg#$NAME#0" | sort -r >> $TMP/$PARSER.$INPUT.list i=`expr $i + 1` done fi echo "$TMP/$PARSER.$INPUT.list" } videos() { if [ ! -e "$TMP/$FILENAME.list" ]; then $curlbin -o - $URL/$PAGE | awk -v SRC=$SRC -v NAME=$NAME -v PICNAME=$PICNAME \ ' # 1. BEGIN variable setzen BEGIN { # 2. setzt suchvariable auf 0 vor dem start suche = 0 newpage = "" piccount = 0 eventinfo = 1 fullmatch_title = "" highlights_title = "" fullmatch_newpage = "" highlights_newpage = "" } # 3. eindeutige zeile vor ersten treffer /