getURI().'/immobilier/annonceimmofo/liste/listeAnnonces?tt=1'.$appartment.$maison; if (isset($param['minarea'])) { $this->request .= ' '.$param['minarea'].' m2'; $link .= '&sur0='.urlencode($param['minarea']); } if (isset($param['maxprice'])) { $link .= '&px1='.urlencode($param['maxprice']); } if (isset($param['pa'])) { $link .= '&pa='.urlencode($param['pa']); } if (isset($param['lo'])) { $this->request .= ' In: '.$param['lo']; $link .= '&lo='.urlencode($param['lo']); } $html = file_get_html($link) or $this->returnError('Could not request paruvendu.', 404); foreach($html->find('div.annonce a') as $element) { if (!$element->title) { continue; } $img =''; foreach($element->find('span.img img') as $img) { if ($img->original) { $img = ''; } } $desc = $element->find('span.desc')[0]->innertext; $desc = str_replace("voir l'annonce", '', $desc); $price = $element->find('span.price')[0]->innertext; list($href) = explode('#', $element->href); $item = new \Item(); $item->uri = $this->getURI().$href; $item->title = $element->title; $item->content = $img.$desc.$price; $this->items[] = $item; } } public function getName(){ return 'Paru Vendu Immobilier'.$this->request; } public function getURI(){ return 'http://www.paruvendu.fr'; } public function getCacheDuration(){ return 10800; // 3 hours } }