Changeset 40141


Ignore:
Timestamp:
Feb 26, 2017, 8:56:57 PM (3 years ago)
Author:
obi
Message:

pornhub.sh add searching

File:
1 edited

Legend:

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

    r40138 r40141  
    4141{
    4242        echo "Genre#$SRC $SRC genre 'categories'#http://atemio.dyndns.tv/mediathek/menu/Movies.genre.jpg#Movies.genre.jpg#$NAME#0" >$TMP/$FILENAME.list
     43        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
    4344        echo "$TMP/$FILENAME.list"
    4445}
     
    5758       
    5859                        if [ -z "$PIC" ]; then
    59                                 PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
     60#                               PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg"
     61                                PIC="http://atemio.dyndns.tv/mediathek/menu/`echo $TITLE | tr 'A-Z' 'a-z'`.jpg"
    6062                        fi
    6163       
     
    8486search()
    8587{
    86         if [ -z "$NEXT" ]; then NEXT="search"; fi
     88#       if [ -z "$NEXT" ]; then NEXT="search"; fi
    8789
    88         if [ -e "$TMP/$FILENAME.list" ] ; then
    89                 rm $TMP/$FILENAME.list
    90         fi
     90#       if [ -e "$TMP/$FILENAME.list" ] ; then
     91#               rm $TMP/$FILENAME.list
     92#       fi
    9193
    9294        if [ ! -e "$TMP/$FILENAME.list" ]; then
     
    9496
    9597                $curlbin $URL/$PAGE$NEXT -o $TMP/cache.$FILENAME.1
    96                 cat $TMP/cache.$FILENAME.1 | tr '\n' ' ' | sed 's/<a href=/\n\n\nfound=/g' | grep ^found= | grep "/view_video.php?viewkey=p" | tr '\t' ' ' | sed 's/ \+/ /g' | grep "img src" >$TMP/cache.$FILENAME.2
     98                cat $TMP/cache.$FILENAME.1 | tr '\n' ' ' | sed 's/<a href=/\n\n\nfound=/g' | grep ^found= | grep "/view_video.php?viewkey=" | tr '\t' ' ' | sed 's/ \+/ /g' | grep "img src" >$TMP/cache.$FILENAME.2
    9799       
    98100#               <li class="page_next_set"><a class="greyButton" href="/video?c=95&amp;page=10">10</a></li>
    99101                pages=`cat $TMP/cache.$FILENAME.1 | grep "&amp;page" | grep "page_next_set" | sed 's/&amp;page=/\nfound="/g' | grep ^found= | cut -d'"' -f2 | tail -n1`
    100102
     103#               <li class="page_number"><a class="greyButton" href="/video/search?search=michaela&amp;page=5">5</a></li>
     104                if [ -z "$pages" ];then
     105                        pages=`cat $TMP/cache.$FILENAME.1 | grep "page_number" | sed 's/&amp;page=/\nfound="/g' | grep ^found= | cut -d'"' -f2 | tail -n1`
     106                fi
     107
    101108                while read -u 3 ROUND; do
    102109                        PIC=`echo $ROUND | sed 's!data-mediumthumb=!\npic=!g' | grep ^pic= | cut -d'"' -f2 | tail -n1`
     110#                       if [ -z "$PIC" ];then
     111#                               PIC=`echo $ROUND | sed 's!data-path=!\npic=!g' | grep ^pic= | cut -d'"' -f2 | tail -n1`
     112#                       fi
     113
    103114                        TITLE=`echo $ROUND | sed 's!title=!\ntitle=!g' | grep ^title= | cut -d'"' -f2`
    104115                        NEWPAGE=`echo $ROUND | cut -d'"' -f2`   
Note: See TracChangeset for help on using the changeset viewer.