Symfony 2 and Goutte

Peampelay

New Member
I want to get some information from a site with CP1251 encoding.\[code\]use Goutte\Client;use Nonlux\Bundle\Entity\News;....protected function downloadQueuePage(){ $cli = new Client(); $url=array_pop($this->_url); $this->output->writeln("http://www.baikal-daily.ru" . $url); $cra=$cli->request("get", "http://www.baikal-daily.ru" . $url); $news=new News(); $news->setSiteId(1); $news->setUrl($url); $news->setTitle($cra->filter("#content .main h3")->text()); }\[/code\]Default Crawler returns on some pages empty nodes h1, but it exist on the page and layout like is valid.After the magic of the code Groute, Crawler and iconv.In one case, I got:\[code\]
 
Back
Top