From d0cfeed3cf3e6dc12ae9571714140963c804338b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Sun, 28 Aug 2016 14:05:39 +0200 Subject: [PATCH] [DuckDuckGoBridge] code simplification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/DuckDuckGoBridge.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bridges/DuckDuckGoBridge.php b/bridges/DuckDuckGoBridge.php index 1ca33bb9..29719a91 100644 --- a/bridges/DuckDuckGoBridge.php +++ b/bridges/DuckDuckGoBridge.php @@ -13,10 +13,8 @@ class DuckDuckGoBridge extends BridgeAbstract{ )); public function collectData(){ - $html = ''; - $link = 'http://duckduckgo.com/html/?q='.$this->getInput('u').'+sort:date'; - - $html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request DuckDuckGo.'); + $html = $this->getSimpleHTMLDOM($this->uri.'html/?q='.$this->getInput('u').'+sort:date') + or $this->returnServerError('Could not request DuckDuckGo.'); foreach($html->find('div.results_links') as $element) { $item = array();