Ajoute le parser Orpi #17

Merged
Shikiryu merged 2 commits from feature/orpi into main 2020-11-10 12:32:02 +01:00
Showing only changes of commit 95ad32935b - Show all commits

View File

@ -24,7 +24,8 @@ class OuestFrance extends Parser
$parsedHome->surface = (int)str_replace(' ', '', $details->eq(2)->filter('strong')->text()); $parsedHome->surface = (int)str_replace(' ', '', $details->eq(2)->filter('strong')->text());
$parsedHome->garden_surface = (int)str_replace(' ', '', $details->eq(3)->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->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->city = ?
// $parsedHome->map = ? // $parsedHome->map = ?
$parsedHome->pictures = $crawler $parsedHome->pictures = $crawler