Changeset 40291
- Timestamp:
- 04/09/17 22:30:19 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localparser_free/myspass.sh
r40289 r40291 42 42 mainmenu() 43 43 { 44 echo "Ganze Folgen#$SRC $SRC season 'api/index.php?command=formats' 1#http://atemio.dyndns.tv/mediathek/menu/s earch.jpg#search.jpg#$NAME#0" >$TMP/$FILENAME.list44 echo "Ganze Folgen#$SRC $SRC season 'api/index.php?command=formats' 1#http://atemio.dyndns.tv/mediathek/menu/shows.jpg#shows.jpg#$NAME#0" >$TMP/$FILENAME.list 45 45 echo "Suchen#$SRC $SRC search 'frontend/json/search-videos.php?QUERY_STRING=%search%' 1#http://atemio.dyndns.tv/mediathek/menu/search.jpg#search.jpg#$NAME#112" >>$TMP/$FILENAME.list 46 46 echo "$TMP/$FILENAME.list" … … 49 49 season() 50 50 { 51 # if [ ! -e "$TMP/$FILENAME.list" ]; then 52 #echo $URL/$PAGE 51 if [ ! -e "$TMP/$FILENAME.list" ]; then 53 52 $curlbin -o - $URL/$PAGE | sed 's/{"format_id":/\n{"format_id":/g' | awk -v SRC=$SRC -v NAME=$NAME -v PICNAME=$PICNAME -v INPUT=$INPUT -v PAGE=$PAGE -v NEXT=$NEXT \ 54 53 ' … … 62 61 /"format_id"/ \ 63 62 { 64 # print "1111111" $065 66 63 i = index($0, "\"format_id\":\"") + 13 67 64 j = index(substr($0, i), "\",\"") - 1 68 65 id = substr($0, i, j) 69 # print "id: " id70 66 71 67 i = index($0, "\"format\":\"") + 10 72 68 j = index(substr($0, i), "\",\"") - 1 73 69 title = substr($0, i, j) 74 # print "title: " title75 70 76 71 i = index($0, "\"number_of_seasons\":\"") + 21 77 72 j = index(substr($0, i), "\",\"") - 1 78 73 extra = substr($0, i, j) 79 # print "extra: " extra80 74 81 75 i = index($0, "\"node_id\":\"") + 11 … … 84 78 gsub(/\\/, "", newpage, newpage) 85 79 86 # print "newpage: " newpage 87 88 i = index($0, "\"96x54\":\"") + 9 80 i = index($0, "\"original_image\":\"") + 18 89 81 j = index(substr($0, i), "\"") - 1 90 82 pic = substr($0, i, j) 91 83 gsub(/\\/, "", pic, pic) 92 # print "pic: " pic93 84 94 85 piccount += 1 … … 97 88 pic = "http://atemio.dyndns.tv/mediathek/menu/default.jpg" 98 89 } 99 # http://m.myspass.de/api/index.php?command=seasonslist&id= 100 # print title " (" extra " Staffeln)#" SRC " " SRC " hoster \x27" newpage "\x27#" pic "#" PICNAME "." piccount ".jpg#" NAME "#111" 101 print title " (" extra " Staffeln)#" SRC " " SRC " year \x27api/index.php?command=seasonslist&id=" id "\x27#" pic "#http:" PICNAME "." piccount ".jpg#" NAME "#0" 90 else 91 pic = "http:" pic 92 93 print title " (" extra " Staffeln)#" SRC " " SRC " year \x27api/index.php?command=seasonslist&id=" id "\x27#" pic "#" PICNAME "." piccount ".jpg#" NAME "#0" 102 94 103 95 next … … 110 102 # schreibe alles in die list datei 111 103 ' >$TMP/$FILENAME.list 112 #fi104 fi 113 105 # gebe titan den list namen mit pfad zurueck 114 106 echo "$TMP/$FILENAME.list" … … 117 109 year() 118 110 { 119 # if [ ! -e "$TMP/$FILENAME.list" ]; then 120 #echo $URL/$PAGE 111 if [ ! -e "$TMP/$FILENAME.list" ]; then 121 112 $curlbin -o - $URL/$PAGE | sed 's/{"season_id":/\n{"season_id":/g' | awk -v SRC=$SRC -v NAME=$NAME -v PICNAME=$PICNAME -v INPUT=$INPUT -v PAGE=$PAGE -v NEXT=$NEXT \ 122 113 ' … … 130 121 /"season_id"/ \ 131 122 { 132 # print "1111111" $0133 134 123 i = index($0, "\"season_id\":\"") + 13 135 124 j = index(substr($0, i), "\",\"") - 1 136 125 id = substr($0, i, j) 137 # print "id: " id138 126 139 127 i = index($0, "\"season_number\":\"") + 17 140 128 j = index(substr($0, i), "\",\"") - 1 141 129 title = substr($0, i, j) 142 # print "title: " title143 130 144 131 i = index($0, "\"season_name\":\"") + 15 145 132 j = index(substr($0, i), "\",\"") - 1 146 133 extra = substr($0, i, j) 147 # print "extra: " extra148 134 149 135 i = index($0, "\"node_id\":\"") + 11 … … 152 138 gsub(/\\/, "", newpage, newpage) 153 139 154 # print "newpage: " newpage155 156 140 i = index($0, "\"original_image\":\"") + 18 157 141 j = index(substr($0, i), "\"") - 1 158 142 pic = substr($0, i, j) 159 143 gsub(/\\/, "", pic, pic) 160 # print "pic: " pic161 144 162 145 piccount += 1 … … 165 148 pic = "http://atemio.dyndns.tv/mediathek/menu/default.jpg" 166 149 } 167 # http://m.myspass.de/api/index.php?command=seasonepisodes&id=285 168 # print title " (" extra " Staffeln)#" SRC " " SRC " hoster \x27" newpage "\x27#" pic "#" PICNAME "." piccount ".jpg#" NAME "#111" 150 else 151 pic = "http:" pic 152 169 153 print "Staffel " title " (" extra ")#" SRC " " SRC " episodes \x27api/index.php?command=seasonepisodes&id=" id "\x27#" pic "#" PICNAME "." piccount ".jpg#" NAME "#0" 170 154 … … 178 162 # schreibe alles in die list datei 179 163 ' >$TMP/$FILENAME.list 180 #fi164 fi 181 165 # gebe titan den list namen mit pfad zurueck 182 166 echo "$TMP/$FILENAME.list" … … 185 169 episodes() 186 170 { 187 # if [ ! -e "$TMP/$FILENAME.list" ]; then 188 #echo $URL/$PAGE 171 if [ ! -e "$TMP/$FILENAME.list" ]; then 189 172 $curlbin -o - $URL/$PAGE | sed 's/{"format":/\n{"format":/g' | awk -v SRC=$SRC -v NAME=$NAME -v PICNAME=$PICNAME -v INPUT=$INPUT -v PAGE=$PAGE -v NEXT=$NEXT \ 190 173 ' … … 198 181 /"format"/ \ 199 182 { 200 # print "1111111" $0201 202 183 i = index($0, "\"episode_id\":\"") + 14 203 184 j = index(substr($0, i), "\",\"") - 1 204 185 id = substr($0, i, j) 205 # print "id: " id206 186 207 187 i = index($0, "\"title\":\"") + 9 208 188 j = index(substr($0, i), "\",\"") - 1 209 189 title = substr($0, i, j) 210 # print "title: " title 190 gsub(" - Teil 1", "", title, title) 211 191 212 192 i = index($0, "\"season_name\":\"") + 15 213 193 j = index(substr($0, i), "\",\"") - 1 214 194 extra = substr($0, i, j) 215 # print "extra: " extra216 217 218 195 219 196 i = index($0, "\"season_number\":\"") + 17 220 197 j = index(substr($0, i), "\",\"") - 1 221 198 season = substr($0, i, j) 222 # print "season: " season223 199 224 200 i = index($0, "\"episode_nr\":\"") + 14 225 201 j = index(substr($0, i), "\",\"") - 1 226 202 episode = substr($0, i, j) 227 # print "episode: " episode 228 229 230 231 i = index($0, "\"video_url\":\"") + 13 203 204 i = index($0, "\"myspass_url\":\"") + 15 232 205 j = index(substr($0, i), "\"") - 1 233 206 newpage = substr($0, i, j) 234 207 gsub(/\\/, "", newpage, newpage) 235 208 236 # print "newpage: " newpage237 238 209 i = index($0, "\"original_image\":\"") + 18 239 210 j = index(substr($0, i), "\"") - 1 240 211 pic = substr($0, i, j) 241 212 gsub(/\\/, "", pic, pic) 242 # print "pic: " pic243 213 244 214 piccount += 1 … … 247 217 pic = "http://atemio.dyndns.tv/mediathek/menu/default.jpg" 248 218 } 249 # http://m.myspass.de/api/index.php?command=seasonepisodes&id=285 250 # print title " (" extra " Staffeln)#" SRC " " SRC " hoster \x27" newpage "\x27#" pic "#" PICNAME "." piccount ".jpg#" NAME "#111" 251 # print "S" season "E" episode " - " title "#" SRC " " SRC " play \x27" newpage "\x27#" pic "#" PICNAME "." piccount ".jpg#" NAME "#0" 252 print "S" season "E" episode " - " title "#" newpage "#http:" pic "#" PICNAME "." piccount ".jpg#" NAME "#2" 253 254 #print newpage 219 print "S" season "E" episode " - " title "#" SRC " " SRC " parts \x27" newpage "\x27#http:" pic "#" PICNAME "." piccount ".jpg#" NAME "#0" 255 220 256 221 next … … 263 228 # schreibe alles in die list datei 264 229 ' >$TMP/$FILENAME.list 265 #fi230 fi 266 231 # gebe titan den list namen mit pfad zurueck 267 232 echo "$TMP/$FILENAME.list" … … 270 235 search() 271 236 { 272 #if [ ! -e "$TMP/$FILENAME.list" ]; then237 if [ ! -e "$TMP/$FILENAME.list" ]; then 273 238 $curlbin -o - $URL/$PAGE | sed 's/{"uniqueID":/\n{"uniqueID":/g' | awk -v SRC=$SRC -v NAME=$NAME -v PICNAME=$PICNAME -v INPUT=$INPUT -v PAGE=$PAGE -v NEXT=$NEXT \ 274 239 ' … … 321 286 # schreibe alles in die list datei 322 287 ' >$TMP/$FILENAME.list 323 #fi288 fi 324 289 # gebe titan den list namen mit pfad zurueck 325 290 echo "$TMP/$FILENAME.list" … … 334 299 { 335 300 echo $URL$PAGE 301 } 302 303 parts() 304 { 305 if [ ! -e "$TMP/$FILENAME.list" ]; then 306 FOUND=`echo $PAGE | sed 's/Teil/\n/g' | grep ^http | sed 's!http://www.myspass.de/myspass!!g' | sed 's!http://www.myspass.de!!g'` 307 IDLIST=`$curlbin "$PAGE" | grep "$FOUND" | sed 's/<a href=/\nfound=/g' | grep ^found= | grep title= | grep -v myspassTeaserTextDesc | cut -d '"' -f2 | sort -u | tr '/' ' ' | awk '{ print $NF }'` 308 309 for ROUND in $IDLIST; do 310 $curlbin http://www.myspass.de/includes/apps/video/getvideometadataxml.php?id=$ROUND > "$TMP/cache.$FILENAME.$ROUND.1" 311 312 # <title><![CDATA[23. September 2006 - Teil 1]]></title> 313 # <url_flv><![CDATA[http://x3583brainc11021.s.o.l.lb.core-cdn.net/secdl/9b7b49482bf7ba65145bc28c6c3ac7b5/58ea7331/11021brainpool/ondemand/3583brainpool/163840/myspass2009/82/578/9231/12073/12073_61.mp4]]></url_flv> 314 # <imagePreview><![CDATA[//www.myspass.de/myspass/media/images/videos/73/12073_640x360.jpg]]></imagePreview> 315 316 TITLE="`cat $TMP/cache.$FILENAME.$ROUND.1 | sed 's/<title><!\[CDATA\[/\nfound=\]/g' | grep ^found= | cut -d"]" -f2`" 317 NEWPAGE="`cat $TMP/cache.$FILENAME.$ROUND.1 | sed 's/<url_flv><!\[CDATA\[/\nfound=\]/g' | grep ^found= | cut -d"]" -f2`" 318 PIC="http:`cat $TMP/cache.$FILENAME.$ROUND.1 | sed 's/<imagePreview><!\[CDATA\[/\nfound=\]/g' | grep ^found= | cut -d"]" -f2`" 319 320 if [ -z "$PIC" ] || "$PIC" = "http:" ] ; then 321 PIC="http://atemio.dyndns.tv/mediathek/menu/default.jpg" 322 fi 323 324 echo "$TITLE#$NEWPAGE#$PIC#$PICNAME$piccount.jpg#$NAME#2" >> $TMP/$FILENAME.list 325 326 done 327 fi 328 329 echo "$TMP/$FILENAME.list" 336 330 } 337 331 … … 344 338 episodes) $INPUT;; 345 339 play) $INPUT;; 340 parts) $INPUT;; 346 341 esac
Note: See TracChangeset
for help on using the changeset viewer.