From cfe433e9e2edfff03f51ba0715287673ecbcad19 Mon Sep 17 00:00:00 2001 From: sysadminstory Date: Fri, 6 Sep 2019 10:52:58 +0200 Subject: [PATCH] [AutoJMBridge] Fix the bridge to follow website changes (#1255) The Website changed in two way : - The filter about availability disappeared (and this leads to a parameters change, which will break existing bridges, sorry) - Some HTML change --- bridges/AutoJMBridge.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/bridges/AutoJMBridge.php b/bridges/AutoJMBridge.php index e8490d95..25fb2cb8 100644 --- a/bridges/AutoJMBridge.php +++ b/bridges/AutoJMBridge.php @@ -15,16 +15,6 @@ class AutoJMBridge extends BridgeAbstract { 'title' => 'URL d\'une recherche avec filtre de véhicules sans le http://www.autojm.fr/', 'exampleValue' => 'achat-voitures-neuves-peugeot-nouvelle-308-5p' ), - 'isDispo' => array( - 'name' => 'Disponibilité', - 'type' => 'list', - 'values' => array( - '-' => '', - 'En stock' => 1, - 'Sur commande' => 0 - ), - 'title' => 'Critère de disponibilité' - ), 'energy' => array( 'name' => 'Carburant', 'type' => 'list', @@ -92,7 +82,6 @@ class AutoJMBridge extends BridgeAbstract { // Build the form $post_data = array( - 'form[isDispo]' => $this->getInput('isDispo'), 'form[energy]' => $this->getInput('energy'), 'form[transmission]' => $this->getInput('transmission'), 'form[priceMin]' => $this->getInput('priceMin'), @@ -121,7 +110,7 @@ class AutoJMBridge extends BridgeAbstract { $html = str_get_html($data->content); // Go through every finisha of the model - $list = $html->find('h2'); + $list = $html->find('h3'); foreach ($list as $finish) { $finish_name = $finish->plaintext; $motorizations = $finish->next_sibling()->find('li');