Exemplo n.º 1
0
 protected static function fetchData(Client $client)
 {
     $page = $client->request('GET', 'http://www.movie.com.uy/teatro/');
     $premieres = self::getPlays($page->filter('div#proximos_est'));
     $billboard = self::getPlays($page->filter('div#cartelera_prin'));
     return array_merge(SpiderHelper::getPosterData($page), ['billboard' => array_merge($premieres, $billboard)]);
 }
Exemplo n.º 2
0
 protected static function fetchData(Client $client)
 {
     $page = $client->request('GET', 'http://www.movie.com.uy/');
     $categories = [];
     array_push($categories, self::createCategory('Cartelera de la Semana', $page->filter('div.proxima-semana')));
     array_push($categories, self::createCategory('Proximos Estrenos', $page->filter('div.proximos-estrenos')));
     return array_merge(SpiderHelper::getPosterData($page), ['categories' => $categories]);
 }
Exemplo n.º 3
0
 protected static function fetchBillboards(Client $client, $tipo)
 {
     // Get all cinema locatons IDs and Names
     $locations = [];
     $page = $client->request('GET', 'http://www.movie.com.uy/cine/');
     $page->filter('select#filter-complejo-cartelera > option')->each(function (Crawler $node) use(&$locations) {
         array_push($locations, ['id' => $node->attr('value'), 'name' => $node->text()]);
     });
     // Get billboard for each cinema location
     foreach ($locations as &$location) {
         $location['billboard'] = self::fetchBillboard($client, $location['id'], $tipo);
     }
     return array_merge(SpiderHelper::getPosterData($page), ['locations' => $locations]);
 }
Exemplo n.º 4
0
 protected static function fetchData(Client $client)
 {
     $id = explode('_', self::$cacheName)[1];
     $page = $client->request('GET', 'http://www.movie.com.uy/pelicula/' . $id . '_/');
     return array_merge(SpiderHelper::getPosterData($page), ['function' => self::getFunction($page)]);
 }
Exemplo n.º 5
0
 protected static function fetchData(Client $client)
 {
     $page = $client->request('GET', 'http://www.movie.com.uy/cine/');
     $premieres = self::getMovies($page->filter('div#proximos_est'), false);
     return array_merge(SpiderHelper::getPosterData($page), ['functions' => $premieres]);
 }