forked from blallo/rss-bridge
[DuckDuckGoBridge] code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
3df0f299de
commit
d0cfeed3cf
1 changed files with 2 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue