From 08158825d9a41918745459632172763bea060282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Mon, 29 Aug 2016 21:54:25 +0200 Subject: [PATCH] [ProjectMGameBridge] code simplification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/ProjectMGameBridge.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/ProjectMGameBridge.php b/bridges/ProjectMGameBridge.php index b7130a23..dad98ddb 100644 --- a/bridges/ProjectMGameBridge.php +++ b/bridges/ProjectMGameBridge.php @@ -8,12 +8,12 @@ class ProjectMGameBridge extends BridgeAbstract{ public function collectData(){ - $html = ''; - $html = $this->getSimpleHTMLDOM('http://projectmgame.com/en/') or $this->returnServerError('Error while downloading the Project M homepage'); + $html = $this->getSimpleHTMLDOM($this->uri) + or $this->returnServerError('Error while downloading the Project M homepage'); foreach($html->find('article') as $article) { $item = array(); - $item['uri'] = 'http://projectmgame.com/en/'.$article->find('section div.info_block a',0)->href; + $item['uri'] = $this->uri.$article->find('section div.info_block a',0)->href; $item['title'] = $article->find('h1 p',0)->innertext; $p_list = $article->find('section p');