Answer the question
In order to leave comments, you need to log in
Symfony 2 Crawler: how to catch an exception?
Good evening, do you have a code?
$page = new Crawler($content);
$currentPrice = $page->filter($parse->getParse())->text();
If parsing fails and empty is returned, then the method ->text()
throws an exception, The current node list is empty. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question