Skip to content

Commit

Permalink
[AutoJMBridge] Fix the bridge to follow website changes (RSS-Bridge#1255
Browse files Browse the repository at this point in the history
)

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
  • Loading branch information
sysadminstory authored and teromene committed Sep 6, 2019
1 parent 753735b commit 059417d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions bridges/AutoJMBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -92,7 +82,6 @@ public function collectData() {

// 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'),
Expand Down Expand Up @@ -121,7 +110,7 @@ public function collectData() {
$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');
Expand Down

0 comments on commit 059417d

Please sign in to comment.