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)]); }
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]); }
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]); }
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)]); }
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]); }