Changeset 39886


Ignore:
Timestamp:
01/31/17 22:58:10 (7 years ago)
Author:
tt4sk
Message:

[TiThek] fixed: bs.to website changed

File:
1 edited

Legend:

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

    r39415 r39886  
    1111PARSER=`echo $SRC | tr '/' '\n' | tail -n1 | sed 's/.sh//'`
    1212NAME="burningseries"
    13 curlbin="curl -k -s"
    1413
    1514#rm -rf $TMP > /dev/null 2>&1
     
    4140genres()
    4241{
    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 '
    4443BEGIN { in_genres = 0
    4544      }
     
    6362series()
    6463{
    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 '
    6665/<span><strong>/ { i = index($0, "<span><strong>") + 14
    6766                   j = index($0, "</strong></span>") - i
     
    111110{
    112111        $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)
     112BEGIN { in_class_clearfix = 0
     113      }
     114
     115/<ul class=\"clearfix\">/ { in_class_clearfix = 1
    114116                          }
    115117
    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         }
    124131' >/tmp/tithek/$PARSER.staffel.list
    125132        echo "/tmp/tithek/$PARSER.staffel.list"
     
    130137        $curlbin -o - $URL$PARAM | awk -v PARAM=$PARAM -v PARAM2=$PARAM2 -v SRC=$SRC -v NAME=$NAME '
    131138BEGIN { in_table_row = 0
    132         episode = ""
    133         url = ""
    134         title = ""
    135       }
     139      }
     140
    136141/<tr>/ { in_table_row = 1
    137142         next
    138143       }
     144
    139145/<td><a href=\"/ { if (in_table_row == 1) {
    140146                      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
    151162         }
    152          next
    153        }
    154 
    155 /<strong>/ { if (in_table_row == 1) {
    156                 i = index($0, "<strong>") + 8
    157                 j = index(substr($0, i), "</strong>") - 1
    158                 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) * 1
    163                       title = substr(title, 1, i - 1) sprintf("%c", j) substr(title, i + 6)
    164                    }
    165                 } while(i != 0)
    166              }
    167              next
    168            }
    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 = 0
    178           }
    179           next
    180         }
    181 
    182 /<li class=\" current\">/ { sub(/<li class=\" current\">/, "<li class=\" \">", $0)
    183                           }
    184163' >/tmp/tithek/$PARSER.episode.list
    185164        echo "/tmp/tithek/$PARSER.episode.list"
     
    190169        $curlbin -o - $URL$PARAM | awk -v PARAM=$PARAM -v PARAM2=$PARAM2 -v SRC=$SRC -v NAME=$NAME '
    191170BEGIN { 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                                 }
    199176
    200177/href=\"/ { if (in_hosterlist == 1) {
     
    206183          }
    207184
    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>&nbsp;/ { if (in_hosterlist == 1) {
     186                 i = index($0, "</span>&nbsp;") + 13
     187                 title = substr($0, i)
     188                 pic = tolower(title)
    216189                 print title "#" SRC " " SRC " hoster " url "#http://atemio.dyndns.tv/mediathek/menu/" pic ".jpg#" pic ".jpg#" NAME "#111"
    217190              }
     
    257230hoster()
    258231{
    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
    321256}
    322257
Note: See TracChangeset for help on using the changeset viewer.