From b519d350bf81faf81d53a63035a37ed9a32e9fb6 Mon Sep 17 00:00:00 2001 From: sysadminstory Date: Sat, 1 Jun 2019 12:12:17 +0200 Subject: [PATCH] [RadioMelodieBridge] Fix bridge after website update (#1145) - The bridge has been adapted to the new website layout - The content now shows the header picture below the date --- bridges/RadioMelodieBridge.php | 47 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/bridges/RadioMelodieBridge.php b/bridges/RadioMelodieBridge.php index 03a14a43..fb5aca6e 100644 --- a/bridges/RadioMelodieBridge.php +++ b/bridges/RadioMelodieBridge.php @@ -12,11 +12,12 @@ class RadioMelodieBridge extends BridgeAbstract { public function collectData(){ $html = getSimpleHTMLDOM(self::URI . '/actu/') or returnServerError('Could not request Radio Melodie.'); - $list = $html->find('div[class=actu_col1]', 0)->children();; + $list = $html->find('div[class=displayList]', 0)->children(); foreach($list as $element) { if($element->tag == 'a') { $articleURL = self::URI . $element->href; $article = getSimpleHTMLDOM($articleURL); + $textDOM = $article->find('article', 0); // Initialise arrays $item = array(); @@ -24,52 +25,50 @@ class RadioMelodieBridge extends BridgeAbstract { $picture = array(); // Get the Main picture URL - $picture[] = $this->rewriteImage($article->find('img[id=picturearticle]', 0)->src); - $audioHTML = $article->find('div[class=sm2-playlist-wrapper]'); + $picture[] = $this->rewriteImage($article->find('div[id=pictureTitleSupport]', 0)->find('img', 0)->src); + $audioHTML = $article->find('audio'); - // Remove the audio placeholder under the Audio player with an