diff --git a/bridges/DuckDuckGoBridge.php b/bridges/DuckDuckGoBridge.php index 169a0165..a1af20f5 100644 --- a/bridges/DuckDuckGoBridge.php +++ b/bridges/DuckDuckGoBridge.php @@ -30,11 +30,11 @@ class DuckDuckGoBridge extends BridgeAbstract { public function collectData(){ $html = getSimpleHTMLDOM(self::URI . 'html/?kd=-1&q=' . $this->getInput('u') . $this->getInput('sort')); - foreach($html->find('div.results_links') as $element) { + foreach($html->find('div.result') as $element) { $item = array(); - $item['uri'] = $element->find('a', 0)->href; - $item['title'] = $element->find('a', 1)->innertext; - $item['content'] = $element->find('div.snippet', 0)->plaintext; + $item['uri'] = $element->find('a.result__a', 0)->href; + $item['title'] = $element->find('h2.result__title', 0)->plaintext; + $item['content'] = $element->find('a.result__snippet', 0)->plaintext; $this->items[] = $item; } }