🐛 Corrige le passage en int
les prix sont formatés en «xxx xxx €», le passage en int ne prenait que les 3 premiers xxx
This commit is contained in:
parent
915d94994e
commit
0776b7ef53
@ -18,12 +18,12 @@ class OuestFrance extends Parser
|
||||
$crawler = new Crawler($body);
|
||||
$parsedHome = new ParsedHome();
|
||||
$parsedHome->title = $crawler->filter('h1')->text();
|
||||
$parsedHome->price = (int)$crawler->filter('#strongPrix')->text();
|
||||
$parsedHome->price = (int)str_replace(' ', '', $crawler->filter('#strongPrix')->text());
|
||||
$parsedHome->description = $crawler->filter('#blockonDescriptif')->text();
|
||||
$details = $crawler->filter('#blocCaractAnn > ul > li');
|
||||
$parsedHome->surface = (int)$details->eq(2)->filter('strong')->text();
|
||||
$parsedHome->garden_surface = (int)$details->eq(3)->filter('strong')->text();
|
||||
$parsedHome->rooms = (int)$details->eq(4)->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->rooms = (int)str_replace(' ', '', $details->eq(4)->filter('strong')->text());
|
||||
$parsedHome->energy = $crawler->filter('#dpeCateg > strong')->text();
|
||||
// $parsedHome->city = ?
|
||||
// $parsedHome->map = ?
|
||||
|
Loading…
Reference in New Issue
Block a user