Exemplo n.º 1
0
 /**
  * Scrapes title main page and image page.
  * 
  * @param  Title  $model
  * @return self
  */
 public function getFullTitle(Title $model)
 {
     //if we don't find imdb we'll forward the
     //request to tmdb parser instead
     if (!$model->imdb_id) {
         return App::make('Lib\\Repository\\Data\\TmdbData')->getFullTitle($model);
     }
     $this->titleModel = $model;
     $urls = $this->compileUrls();
     $html = $this->scraper->multiCurl($urls);
     $this->crawler = new Crawler($html['main']);
     $this->imgCrawler = new Crawler($html['imgs']);
     return $this;
 }