Changeset 41991 for titan/mediathek
- Timestamp:
- Mar 11, 2018, 12:48:08 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localparser_free/watchbox.sh
r41986 r41991 43 43 echo "Neue Filme#$SRC $SRC new 1 0 'filme/neu/'#http://atemio.dyndns.tv/mediathek/menu/Movies.jpg#Movies.jpg#$NAME#0" > $TMP/$PARSER.$INPUT.list 44 44 # echo "Neue Serien#$SRC $SRC new 1 0 'serien/neu/'#http://atemio.dyndns.tv/mediathek/menu/serien.jpg#serien.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.list 45 # echo "Search#$SRC $SRC search 1 0 '?s='#http://atemio.dyndns.tv/mediathek/menu/search.jpg#search.jpg#$NAME#112" >> $TMP/$PARSER.$INPUT.list45 echo "Filme suchen#$SRC $SRC search 1 0 'https://api.watchbox.de/v1/search/?active=true&maxPerPage=30&page=1&types=%5B%22film%22%5D&term='#http://atemio.dyndns.tv/mediathek/menu/search.jpg#search.jpg#$NAME#112" >> $TMP/$PARSER.$INPUT.list 46 46 47 47 if [ "`echo $TMP/$PARSER.new.*.list`" != "$TMP/$PARSER.new.*.list" ] ; then … … 112 112 { 113 113 if [ ! -e "$TMP/$PARSER.$INPUT.$CURPAGE.list" ] ; then 114 if [ "$CURPAGE" -eq "1" ] ; then115 NEWPAGE=$PAGE116 else117 NEWPAGE=`echo $PAGE | sed "s/@PAGE@/$CURPAGE/g"`118 fi119 $curlbin $ URL/$NEWPAGE -o $TMP/cache.$PARSER.$INPUT.1114 # if [ "$CURPAGE" -eq "1" ] ; then 115 # NEWPAGE=$PAGE 116 # else 117 # NEWPAGE=`echo $PAGE | sed "s/@PAGE@/$CURPAGE/g"` 118 # fi 119 $curlbin $PAGE -o $TMP/cache.$PARSER.$INPUT.1 120 120 121 cat $TMP/cache.$PARSER.$INPUT.1 | tr '\n' ' ' | sed -e 's/<a href=/\n<a href=/g' -e 's/Film/\nFilm/g' | grep '^<a href=' | grep '<img src=' > $TMP/cache.$PARSER.$INPUT.1a122 cat $TMP/cache.$PARSER.$INPUT.1a | sed '/Stream in HD/d'> $TMP/cache.$PARSER.$INPUT.2121 cat $TMP/cache.$PARSER.$INPUT.1 | sed 's!"type"!\n"type"!g' > $TMP/cache.$PARSER.$INPUT.2 122 echo >> $TMP/cache.$PARSER.$INPUT.2 123 123 while read -u 3 ROUND; do 124 TITLE=`echo $ROUND | sed 's/alt=/\nalt=/' | grep ^"alt=" | cut -d '"' -f2 | sed 's/#/%/'` 125 TITLE=`echo $TITLE | sed -e 's/&/&/g' -e 's/&/und/g' -e 's/"/"/g' -e 's/</\</g' -e 's/"/\"/g' -e 's/'/\"/g' -e 's/&%8211;/-/g' -e "s/&%8217;/'/g"` 126 PIC=`echo $ROUND | sed 's/img src/\nsrc=/' | grep ^"src=" | cut -d '"' -f2` 127 NEWPAGE=`echo $ROUND | sed 's/<a href=/\nhref=/' | grep ^"href=" | cut -d '"' -f2` 124 TITLE=`echo $ROUND | grep 'headline":"' | sed -e 's!headline":"!\n"!g' | cut -d '"' -f2 | sed '/type/d'` 125 ENTITYID=`echo $ROUND | grep 'entityId":' | sed -e 's!entityId":!\n!g' | cut -d ',' -f1 | sed '/type/d'` 126 SEOPATH=`echo $ROUND | grep 'seoPath":"' | sed -e 's!seoPath":"!\n"!g' | cut -d '"' -f2 | sed '/type/d'` 127 PIC="https://aiswatchbox-a.akamaihd.net/watchbox/format/"$ENTITYID"_dvdcover/484x677/"$SEOPATH".jpg" 128 NEWPAGE="/filme/"$SEOPATH"-"$ENTITYID".html" 128 129 129 130 if [ -z "$PIC" ]; then … … 152 153 fi 153 154 done 3<$TMP/cache.$PARSER.$INPUT.2 154 if [ "$CURPAGE" -eq "1" ] ; then155 PAGE="page/@PAGE@$PAGE"156 MAXPAGE=`cat $TMP/cache.$PARSER.$INPUT.1 | sed '/<div class="pagination/!d;s/^.*Seite 1 von //;s/<\/span>.*$//'`157 fi158 if [ "$ CURPAGE" -lt "$MAXPAGE" ] ; then155 156 TOTALITEM=`cat $TMP/cache.$PARSER.$INPUT.2 | sed q | cut -d ',' -f1 | sed 's!:!\n!g' | sed '1,1d'` 157 MAXPAGE=`echo $(($TOTALITEM/30+1))` 158 159 if [ "$MAXPAGE" -gt "$CURPAGE" ] ; then 159 160 NEWPAGE=`expr $CURPAGE + 1` 161 PAGE=$(echo $PAGE | sed -e "s!page=$CURPAGE!page=$NEWPAGE!g") 160 162 echo "Page ($NEWPAGE/$MAXPAGE)#$SRC $SRC search $NEWPAGE $MAXPAGE '$PAGE'#http://atemio.dyndns.tv/mediathek/menu/next.jpg#next.jpg#$NAME#0" >> $TMP/$PARSER.$INPUT.$CURPAGE.list 161 163 fi 162 164 163 #rm $TMP/cache.$PARSER.$INPUT.* > /dev/null 2>&1165 rm $TMP/cache.$PARSER.$INPUT.* > /dev/null 2>&1 164 166 fi 165 167
Note: See TracChangeset
for help on using the changeset viewer.