Changeset 40205


Ignore:
Timestamp:
03/02/17 13:56:43 (7 years ago)
Author:
obi
Message:

optimize pornhub

File:
1 edited

Legend:

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

    r40204 r40205  
    1010PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'`
    1111
    12 FILENAME="$PARSER $INPUT $PAGE $NEXT"
    13 FILENAME=`echo $FILENAME | tr '&' '.' | tr '/' '.' | tr '?' '.' | tr ';' '.' | tr '=' '.' | sed 's/ \+/./g' | sed 's/\.\+/./g'`
     12FILENAME="`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'` $INPUT $PAGE $NEXT"
     13FILENAME="`echo $FILENAME | sed -e 's/\&\+/./g' -e 's#\/\+#.#g' -e 's/\?\+/./g' -e 's/;\+/./g' -e 's/=\+/./g' -e 's/ \+/./g' -e 's/\.\+/./g'`"
     14PICNAME=`echo $FILENAME`
    1415
    1516if [ -z "$FILENAME" ]; then
     
    8586{
    8687        if [ ! -e "$TMP/$FILENAME.list" ]; then
    87                 $curlbin -o - $URL/$PAGE | awk -v SRC=$SRC -v NAME=$NAME \
     88                $curlbin -o - $URL/$PAGE | awk -v SRC=$SRC -v NAME=$NAME -v PICNAME=$PICNAME \
    8889                '
    8990                        # 1. BEGIN variable setzen
     
    9394                                suche = 0
    9495                                newpage = ""
     96                                piccount = 0
    9597                        }
    9698                        # 3. eindeutige zeile vor ersten treffer
     
    153155                            pic = substr($0, i, j)
    154156                                       
    155                                         # 21. erstelle lokalen picname aus kleingeschriebenen titel
    156                                         # 22. titel = reife frauen
    157                                         picname = tolower(title)
    158        
    159                                         # 23. tausche leehrzeichen in punkte
    160                                         # 24. titel = reife.frauen
    161                             gsub(" ", ".", picname, picname)
     157                                        if ( pic == "" )
     158                                        {
     159                                                # 21. erstelle lokalen picname aus kleingeschriebenen titel
     160                                                # 22. titel = reife frauen
     161                                                picname = tolower(title)
     162       
     163                                                # 23. tausche leehrzeichen in punkte
     164                                                # 24. titel = reife.frauen
     165                                gsub(" ", ".", picname, picname)
     166                                                pic = "http://atemio.dyndns.tv/mediathek/menu/" picname ".jpg"
     167                                        }
    162168       
    163169                                        if (title != "")
    164170                                        {
     171                                                piccount += 1
    165172                                                # 25. in naechste zeile springen
    166173                                                # 26. \x27 = single quotes
    167                                                 print title "#" SRC " " SRC " search \x27" newpage "&page=\x27 1#" pic "#" picname ".jpg#" NAME "#0"
     174                                                print title "#" SRC " " SRC " search \x27" newpage "&page=\x27 1#" pic "#" PICNAME "." piccount ".jpg#" NAME "#0"
    168175                                        }
    169176                                       
     
    272279{
    273280#       if [ ! -e "$TMP/$FILENAME.list" ]; then
    274                 $curlbin -o - $URL$PAGE$NEXT | awk -v SRC=$SRC -v NAME=$NAME -v PARSER=$PARSER -v FILENAME=$FILENAME -v INPUT=$INPUT -v PAGE=$PAGE -v NEXT=$NEXT \
     281                $curlbin -o - $URL$PAGE$NEXT | awk -v SRC=$SRC -v NAME=$NAME -v PICNAME=$PICNAME -v INPUT=$INPUT -v PAGE=$PAGE -v NEXT=$NEXT \
    275282                '
    276283                        # BEGIN variable setzen
     
    368375                                                # pic = http://i0.cdn2b.image.pornhub.phncdn.com/videos/201702/17/106465292/original/........
    369376                                    pic = substr($0, i, j)
    370                
     377
     378                                                if ( pic == "" )
     379                                                {
     380                                        pic = "http://atemio.dyndns.tv/mediathek/menu/default.jpg"
     381                                                }
     382
    371383                                                if (title != "")
    372384                                                {
    373                                                         picname = tolower(title)
    374                                             gsub(" ", ".", picname, picname)
    375 
    376385                                                        piccount += 1
    377386                                                        # in naechste zeile springen
    378387                                                        # \x27 = single quotes
    379 # variable FILENAME bringt ein - statt den inhalt
    380 # pornhub.search.video.c.95.page.1
    381 #                                                       print title "(" pages "/" pages ")#" SRC " " SRC " hoster \x27" newpage "\x27#" pic "#" FILENAME "." piccount ".jpg#" NAME "#111"
    382 #                                                       print title "(" pages "/" pages ")#" SRC " " SRC " hoster \x27" newpage "\x27#" pic "#" PARSER "." INPUT "." PAGE "." NEXT "." piccount ".jpg#" NAME "#111"
    383                                                         print title "(" pages "/" pages ")#" SRC " " SRC " hoster \x27" newpage "\x27#" pic "#" PARSER "." picname "." piccount ".jpg#" NAME "#111"
     388                                                        print title "(" pages "/" pages ")#" SRC " " SRC " hoster \x27" newpage "\x27#" pic "#" PICNAME "." piccount ".jpg#" NAME "#111"
    384389                                                }
    385390               
Note: See TracChangeset for help on using the changeset viewer.