#!/bin/sh # first sh box parser for titannit mfg obi case $2 in init) echo skip load hoster.sh;; *) . /tmp/localhoster/hoster.sh;; esac 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://www.pornhub.com NAME="Pornhub" 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 -rf $TMP > /dev/null 2>&1 echo "$NAME ($TYPE)#$SRC $SRC mainmenu#http://atemio.dyndns.tv/mediathek/menu/$PARSER.jpg#$PARSER.jpg#TiThek#1000" } mainmenu() { echo "Genre#$SRC $SRC genre 'categories'#http://atemio.dyndns.tv/mediathek/menu/Movies.genre.jpg#Movies.genre.jpg#$NAME#0" >$TMP/$FILENAME.list echo "Pornstars#$SRC $SRC pornstars '/pornstars?page=' 1#http://atemio.dyndns.tv/mediathek/menu/pornstars.jpg#pornstars.jpg#$NAME#0" >>$TMP/$FILENAME.list echo "Suchen#$SRC $SRC search '/video/search?search=%search%&page=' 1#http://atemio.dyndns.tv/mediathek/menu/search.jpg#search.jpg#$NAME#112" >>$TMP/$FILENAME.list echo "$TMP/$FILENAME.list" } # comment block1 start <<"COMMENT"
TitanNit-ufs912:~# time /tmp/localparser/pornhub.sh /tmp/localparser/pornhub.sh genre 'categories' /tmp/tithek/pornhub.genres.list real 0m 1.07s user 0m 0.39s sys 0m 0.39s TitanNit-ufs912: TitanNit-ufs912:~# time /tmp/localparser/pornhub.sh /tmp/localparser/pornhub.sh genreold 'categories' /tmp/localcache/pornhub.genreold.categories.list real 0m 19.03s user 0m 4.71s sys 0m 12.14s TitanNit-ufs912:~# COMMENT # comment block1 end genre() { 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 } # 3. eindeutige zeile vor ersten treffer /