Changeset 39886
- Timestamp:
- 01/31/17 22:58:10 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localparser_secret/bs.sh
r39415 r39886 11 11 PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'` 12 12 NAME="burningseries" 13 curlbin="curl -k -s"14 13 15 14 #rm -rf $TMP > /dev/null 2>&1 … … 41 40 genres() 42 41 { 43 $curlbin -o - $URL" andere-serien" | awk -v SRC=$SRC -v NAME=$NAME '42 $curlbin -o - $URL"serie-genre" | awk -v SRC=$SRC -v NAME=$NAME ' 44 43 BEGIN { in_genres = 0 45 44 } … … 63 62 series() 64 63 { 65 $curlbin -o - $URL" andere-serien" | awk -v PARAM=$PARAM -v SRC=$SRC -v NAME=$NAME '64 $curlbin -o - $URL"serie-genre" | awk -v PARAM=$PARAM -v SRC=$SRC -v NAME=$NAME ' 66 65 /<span><strong>/ { i = index($0, "<span><strong>") + 14 67 66 j = index($0, "</strong></span>") - i … … 111 110 { 112 111 $curlbin -o - $URL$PARAM | awk -v PARAM=$PARAM -v SRC=$SRC -v NAME=$NAME ' 113 /<li class=\" current\">/ { sub(/<li class=\" current\">/, "<li class=\" \">", $0) 112 BEGIN { in_class_clearfix = 0 113 } 114 115 /<ul class=\"clearfix\">/ { in_class_clearfix = 1 114 116 } 115 117 116 /<li class=\" \"><a href="/ { i = index($0, "<li class=\" \"><a href=\"") + 23 117 j = index(substr($0, i), "\">") - 1 118 url = substr($0, i, j) 119 k = i + j + 2 120 l = index(substr($0, k), "</a></li>") - 1 121 staffel = substr($0, k, l) 122 print "Staffel " staffel "#" SRC " " SRC " episode " url " " staffel "#http://atemio.dyndns.tv/mediathek/menu/s" staffel ".jpg#s" staffel ".jpg#" NAME "#0" 123 } 118 /<li><a href=\"/ { if (in_class_clearfix == 1) { 119 i = index($0, "<li><a href=\"") + 13 120 j = index(substr($0, i), "\">") - 1 121 url = substr($0, i, j) 122 k = i + j + 2 123 l = index(substr($0, k), "</a></li>") - 1 124 staffel = substr($0, k, l) 125 print "Staffel " staffel "#" SRC " " SRC " episode " url " " staffel "#http://atemio.dyndns.tv/mediathek/menu/s" staffel ".jpg#s" staffel ".jpg#" NAME "#0" 126 } 127 } 128 129 /<\/ul>/ { in_class_clearfix = 0 130 } 124 131 ' >/tmp/tithek/$PARSER.staffel.list 125 132 echo "/tmp/tithek/$PARSER.staffel.list" … … 130 137 $curlbin -o - $URL$PARAM | awk -v PARAM=$PARAM -v PARAM2=$PARAM2 -v SRC=$SRC -v NAME=$NAME ' 131 138 BEGIN { in_table_row = 0 132 episode = "" 133 url = "" 134 title = "" 135 } 139 } 140 136 141 /<tr>/ { in_table_row = 1 137 142 next 138 143 } 144 139 145 /<td><a href=\"/ { if (in_table_row == 1) { 140 146 i = index($0, "<td><a href=\"") + 13 141 j = index(substr($0, i), "\">") - 1 142 url = substr($0, i, j) 143 } 144 next 145 } 146 147 /<td>/ { if (in_table_row == 1) { 148 i = index($0, "<td>") + 4 149 j = index(substr($0, i), "</td>") - 1 150 episode = substr($0, i, j) 147 j = index(substr($0, i), "\"") - 1 148 url = substr($0, i, j) 149 i = index($0, "title=\"") + 7 150 j = index(substr($0, i), "\"") - 1 151 title = substr($0, i, j) 152 k = i + j + 2 153 l = index(substr($0, k), "</a></td>") - 1 154 episode = substr($0, k, l) 155 print title "#" SRC " " SRC " hosterlist " url "#http://atemio.dyndns.tv/mediathek/menu/s" PARAM2 "e" episode ".jpg#s" PARAM2 "e" episode ".jpg#" NAME "#0" 156 } 157 next 158 } 159 160 /<\/tr>/ { in_table_row = 0 161 next 151 162 } 152 next153 }154 155 /<strong>/ { if (in_table_row == 1) {156 i = index($0, "<strong>") + 8157 j = index(substr($0, i), "</strong>") - 1158 title = substr($0, i, j)159 do {160 i = match(title, /&#[0-2][0-9][0-9];/)161 if (i != 0) {162 j = substr(title, i + 2, 3) * 1163 title = substr(title, 1, i - 1) sprintf("%c", j) substr(title, i + 6)164 }165 } while(i != 0)166 }167 next168 }169 170 /<\/tr>/ { if (in_table_row == 1) {171 if (episode != "") {172 print title "#" SRC " " SRC " hosterlist " url "#http://atemio.dyndns.tv/mediathek/menu/s" PARAM2 "e" episode ".jpg#s" PARAM2 "e" episode ".jpg#" NAME "#0"173 title = ""174 url = ""175 episode = ""176 }177 in_table_row = 0178 }179 next180 }181 182 /<li class=\" current\">/ { sub(/<li class=\" current\">/, "<li class=\" \">", $0)183 }184 163 ' >/tmp/tithek/$PARSER.episode.list 185 164 echo "/tmp/tithek/$PARSER.episode.list" … … 190 169 $curlbin -o - $URL$PARAM | awk -v PARAM=$PARAM -v PARAM2=$PARAM2 -v SRC=$SRC -v NAME=$NAME ' 191 170 BEGIN { in_hosterlist = 0 192 url = "" 193 title = "" 194 } 195 196 /<h3>Hoster dieser Episode<\/h3>/ { in_hosterlist = 1 197 next 198 } 171 } 172 173 /<ul class=\"hoster-tabs top\">/ { in_hosterlist = 1 174 next 175 } 199 176 200 177 /href=\"/ { if (in_hosterlist == 1) { … … 206 183 } 207 184 208 /<\/span> / { if (in_hosterlist == 1) { 209 i = index($0, "</span> ") + 8 210 j = index(substr($0, i), "</a>") - 1 211 title = substr($0, i, j) 212 i = index($0, "</span> ") + 8 213 j = index(substr($0, i), " -") - 1 214 pic = substr($0, i, j) 215 pic = tolower(pic) 185 /<\/span> / { if (in_hosterlist == 1) { 186 i = index($0, "</span> ") + 13 187 title = substr($0, i) 188 pic = tolower(title) 216 189 print title "#" SRC " " SRC " hoster " url "#http://atemio.dyndns.tv/mediathek/menu/" pic ".jpg#" pic ".jpg#" NAME "#111" 217 190 } … … 257 230 hoster() 258 231 { 259 $curlbin -o - $URL$PARAM | awk -v PARAM=$PARAM -v PARAM2=$PARAM2 -v SRC=$SRC -v NAME=$NAME ' 260 BEGIN { in_hosterlist = 0 261 url = "" 262 title = "" 263 } 264 265 /<iframe scrolling=/ { in_hoster_iframe = 1 266 prew 267 } 268 269 /src=/ { if (in_hoster_iframe == 1) { 270 i = index($0, "src=") + 5 271 j = index(substr($0, i), ">") - 2 272 url = substr($0, i, j) 273 i = index($0, "<a href=\"") + 16 274 j = index(substr($0, i), "/") - 1 275 title = substr($0, i, j) 276 277 # print "Originalvideo#" url "#http://atemio.dyndns.tv/mediathek/menu/default.jpg#default.jpg#" NAME "#140" 278 # print title "#" url "#http://atemio.dyndns.tv/mediathek/menu/" title ".jpg#" title ".jpg#" NAME "#14" 279 print url 280 } 281 next 282 } 283 284 /<div id=\"video_actions\">/ { in_hoster = 1 285 next 286 } 287 288 /<a href=\"/ { if (in_hoster == 1 && in_hoster_iframe == 0) { 289 i = index($0, "<a href=\"") + 9 290 j = index(substr($0, i), "\"") - 1 291 url = substr($0, i, j) 292 293 i = index($0, "<a href=\"") + 16 294 j = index(substr($0, i), "/") - 1 295 title = substr($0, i, j) 296 297 # print "Originalvideo#" url "#http://atemio.dyndns.tv/mediathek/menu/default.jpg#default.jpg#" NAME "#140" 298 # print title "#" url "#http://atemio.dyndns.tv/mediathek/menu/" title ".jpg#" title ".jpg#" NAME "#14" 299 300 tmp = "curl -k -s -L --cookie /mnt/network/cookies --cookie-jar /mnt/network/cookies -A \"Mozilla\/5.0 \(Windows NT 6.3\; WOW64\) AppleWebKit\/537.36 \(KHTML, like Gecko\) Maxthon\/4.4.7.3000 Chrome\/30.0.1599.101 Safari\/537.36\" -s -D - " url " | grep Location: | tail -n1 | cut -d \" \" -f2" 301 #tmp = "curl -s -D - " url " | grep Location: | tail -n1" 302 303 while ((tmp | getline) > 0) 304 print 305 #print tmp 306 #print $0 307 308 close(tmp) 309 } 310 next 311 } 312 313 /<\/div>/ { in_hoster = 0 314 in_hoster_iframe = 0 315 next 316 } 317 318 ' >/tmp/tithek/$PARSER.hoster.list 319 # echo "/tmp/tithek/$PARSER.hoster.list" 320 cat "/tmp/tithek/$PARSER.hoster.list" 232 STREAM=`$curlbin -o - $URL$PARAM | awk ' 233 /class=\"hoster-player\"/ { i = index($0, "<a href=\"") + 9 234 j = index(substr($0, i), "\"") - 1 235 url = substr($0, i, j) 236 print url 237 next 238 } 239 '` 240 $curlbin -o - $STREAM >/tmp/tithek/$PARSER.hoster.1 241 cat /tmp/tithek/$PARSER.hoster.1 | $curlbin -o - $STREAM | awk ' 242 /\"og:url\" content=/ { i = index($0, "\"og:url\" content=") + 18 243 j = index(substr($0, i), "\"") - 1 244 url = substr($0, i, j) 245 print url 246 next 247 } 248 /name=\"id\" value=\"/ { i = index($0, "value=\"") + 7 249 j = index(substr($0, i), "\"") - 1 250 url = "http://vidto.me/" substr($0, i, j) ".html" 251 print url 252 next 253 } 254 ' >/tmp/tithek/$PARSER.hoster.list 255 cat /tmp/tithek/$PARSER.hoster.list 321 256 } 322 257
Note: See TracChangeset
for help on using the changeset viewer.