From 497d3fd7aafcf4b23197e647c9ca024b6c2cf188 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Tue, 13 Oct 2015 23:28:38 +0200 Subject: [PATCH] [LesJoiesDuCode] Fix markup detection --- bridges/LesJoiesDuCodeBridge.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bridges/LesJoiesDuCodeBridge.php b/bridges/LesJoiesDuCodeBridge.php index 4ccc9d0..d90680c 100644 --- a/bridges/LesJoiesDuCodeBridge.php +++ b/bridges/LesJoiesDuCodeBridge.php @@ -12,17 +12,16 @@ class LesJoiesDuCodeBridge extends BridgeAbstract{ public function collectData(array $param){ $html = file_get_html('http://lesjoiesducode.fr/') or $this->returnError('Could not request LesJoiesDuCode.', 404); - foreach($html->find('div.post') as $element) { + foreach($html->find('div.blog-post') as $element) { $item = new Item(); - $temp = $element->find('h3 a', 0); - + $temp = $element->find('h1 a', 0); $titre = $temp->innertext; $url = $temp->href; - $temp = $element->find('div.bodytype', 0); + $temp = $element->find('div.blog-post-content', 0); // retrieve .gif instead of static .jpg - $images = $temp->find('p.e img'); + $images = $temp->find('p img'); foreach($images as $image){ $img_src = str_replace(".jpg",".gif",$image->src); $image->src = $img_src;