From 8e3f6dbc733a263228584c002a03705e8fa88ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Mon, 29 Aug 2016 00:41:47 +0200 Subject: [PATCH] [GoogleSearchBridge] fix line length + code simplification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/GoogleSearchBridge.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bridges/GoogleSearchBridge.php b/bridges/GoogleSearchBridge.php index 2c2ecac8..fb3d7403 100644 --- a/bridges/GoogleSearchBridge.php +++ b/bridges/GoogleSearchBridge.php @@ -9,7 +9,6 @@ */ class GoogleSearchBridge extends BridgeAbstract{ - public $maintainer = "sebsauvage"; public $name = "Google search"; public $uri = "https://www.google.com/"; @@ -26,7 +25,10 @@ class GoogleSearchBridge extends BridgeAbstract{ public function collectData(){ $html = ''; - $html = $this->getSimpleHTMLDOM('https://www.google.com/search?q=' . urlencode($this->getInput('q')) . '&num=100&complete=0&tbs=qdr:y,sbd:1') or $this->returnServerError('No results for this query.'); + $html = $this->getSimpleHTMLDOM($this->uri + .'search?q=' . urlencode($this->getInput('q')) + .'&num=100&complete=0&tbs=qdr:y,sbd:1') + or $this->returnServerError('No results for this query.'); $emIsRes = $html->find('div[id=ires]',0); if( !is_null($emIsRes) ){