🐛 Corrige le parsing de l'énergie si vide de Ouest France
This commit is contained in:
parent
491fd2fa8d
commit
020cd78822
@ -24,7 +24,8 @@ class OuestFrance extends Parser
|
||||
$parsedHome->surface = (int)str_replace(' ', '', $details->eq(2)->filter('strong')->text());
|
||||
$parsedHome->garden_surface = (int)str_replace(' ', '', $details->eq(3)->filter('strong')->text());
|
||||
$parsedHome->rooms = (int)str_replace(' ', '', $details->eq(4)->filter('strong')->text());
|
||||
$parsedHome->energy = $crawler->filter('#dpeCateg > strong')->text();
|
||||
$dpeCateg = $crawler->filter('#dpeCateg > strong');
|
||||
$parsedHome->energy = $dpeCateg->count() === 1 ? $dpeCateg->text() : '';
|
||||
// $parsedHome->city = ?
|
||||
// $parsedHome->map = ?
|
||||
$parsedHome->pictures = $crawler
|
||||
|
Loading…
Reference in New Issue
Block a user