From b547285b8880cbf8eed3d8d610011cb0cbecb5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Mon, 29 Aug 2016 13:53:00 +0200 Subject: [PATCH] [NeuviemeArtBridge] code simplification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/NeuviemeArtBridge.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/NeuviemeArtBridge.php b/bridges/NeuviemeArtBridge.php index ff33fa1..54261c2 100644 --- a/bridges/NeuviemeArtBridge.php +++ b/bridges/NeuviemeArtBridge.php @@ -16,7 +16,7 @@ class NeuviemeArtBridge extends BridgeAbstract { } return $string; } - $feedUrl = 'http://www.9emeart.fr/9emeart.rss'; + $feedUrl = $this->uri.'9emeart.rss'; $html = $this->getSimpleHTMLDOM($feedUrl) or $this->returnServerError('Could not request 9eme Art: '.$feedUrl); $limit = 0; @@ -32,9 +32,9 @@ class NeuviemeArtBridge extends BridgeAbstract { $article_image = $element->find('enclosure', 0)->url; foreach ($article_html->find('img.img_full') as $img) if ($img->alt == $article_title) - $article_image = 'http://www.9emeart.fr'.$img->src; + $article_image = $this->uri.$img->src; $article_content = '

' - .str_replace('src="/', 'src="http://www.9emeart.fr/', $article_html->find('div.newsGenerique_con', 0)->innertext); + .str_replace('src="/', 'src="'.$this->uri, $article_html->find('div.newsGenerique_con', 0)->innertext); $article_content = StripWithDelimiters($article_content, ''); $article_content = StripWithDelimiters($article_content, ''); $article_content = StripWithDelimiters($article_content, '');