Changeset 41904 for titan/mediathek


Ignore:
Timestamp:
Feb 14, 2018, 12:14:26 AM (22 months ago)
Author:
tt4sk
Message:

[TiThek] fixed: tata.sh missing last channel, optimize search for URLs and pictures of channels

File:
1 edited

Legend:

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

    r41898 r41904  
    4040{
    4141        echo "Channels#$SRC $SRC channels 'channels'#http://atemio.dyndns.tv/mediathek/menu/channels.jpg#all-newfirst.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list
     42        if [ -e "$TMP/$PARSER.channels.list" ] ; then
     43                rm $TMP/$PARSER.channels.list
     44        fi
    4245        echo "$TMP/$PARSER.$INPUT.list"
    4346}
     
    5154#               /tmp/localhoster/hoster.sh get $URL/$PAGE > $TMP/cache.$PARSER.$INPUT.1
    5255
    53                 cat $TMP/cache.$PARSER.$INPUT.1 | tr '\n' ' ' | tr '\r' ' ' | sed 's/<div class="ml-item chanel-tem">/\n<div class="ml-item chanel-tem">/g' | grep ^'<div class="ml-item chanel-tem">' | grep alt= | grep -v .gif > /$TMP/cache.$PARSER.$INPUT.2
     56#               cat $TMP/cache.$PARSER.$INPUT.1 | tr '\n' ' ' | tr '\r' ' ' | sed 's/<div class="ml-item chanel-tem">/\n<div class="ml-item chanel-tem">/g' | grep ^'<div class="ml-item chanel-tem">' | grep alt= | grep -v .gif > /$TMP/cache.$PARSER.$INPUT.2
     57                cat $TMP/cache.$PARSER.$INPUT.1 | sed '/<div class="ml-list-holder">/,/<nav class="page-nav">/!d;/<a href=/!d;N;s/\r\n/ /;s/^.* <a href="//;s/" class="ml-image">.*<img src="/#/;s/" alt=".*$//' > /$TMP/cache.$PARSER.$INPUT.2
    5458                while read -u 3 ROUND; do
    55                         PIC=`echo $ROUND | sed -nr 's/.*<img src="([^"]+)".*/\1/p'`
    56                         NEWPAGE=`echo $ROUND | sed -nr 's/.*<a href="([^"]+)".*/\1/p'`
     59#                       PIC=`echo $ROUND | sed -nr 's/.*<img src="([^"]+)".*/\1/p'`
     60                        PIC=`echo $ROUND | cut -d'#' -f2`
     61#                       NEWPAGE=`echo $ROUND | sed -nr 's/.*<a href="([^"]+)".*/\1/p'`
     62                        NEWPAGE=`echo $ROUND | cut -d'#' -f1`
    5763                        TITLE=`echo $NEWPAGE | tr '/' '\n' | tail -n1`
    5864
Note: See TracChangeset for help on using the changeset viewer.