예제 #1
0
 def movie_parse(self, response):
     dub = response.css('div.filmes-dublados > ul > li::text')
     leg = response.css('div.filmes-legendados > ul > li::text')
     yield {
         'name': format_movie_name(response.css('h1.hNomeFilmeCompleto::text').extract_first()),
         'movie_theater': self.name.capitalize(),
         'url': response.url,
         'table': get_table_from_type(dub, 'DUB') + get_table_from_type(leg, 'LEG')
     }
예제 #2
0
 def movie_parse(self, response):
     movie_time = [mt for mt in response.css('section.detalhes > ul > li > p::text').extract_first().split(' | ')]
     yield {
         'name': format_movie_name(response.css('header.filmeTitle > h1::text').extract_first()),
         'movie_theater': self.name.capitalize(),
         'url': response.url,
         'table': [{
                 'time': movie_type.split(' ')[0].replace('*', ''),
                 'type': _get_type(movie_type.split(' ')[1])
             } for movie_type in movie_time
         ],
     }
예제 #3
0
 def movie_parse(self, response):
     table = []
     for type_col in response.css('div.infos > div > table'):
         movie_type = type_col.css('thead > tr > th::text').extract_first()[:3]
         for line in type_col.css('tbody > tr > td'):
             table.append({
                 'type': movie_type,
                 'time': line.css('p::text')[0].extract().split(' - ')[-1].replace('h', ':')
             })
     yield {
         'name': format_movie_name(response.css('div.tit-principal > span::text').extract_first()),
         'movie_theater': self.name.capitalize(),
         'url': response.url,
         'table': table
     }