From 607d9297ffc0086251d50e4453e7d564a5602b56 Mon Sep 17 00:00:00 2001 From: Joseph Date: Sat, 15 Jan 2022 05:24:13 +0000 Subject: [PATCH] [DuckDuckGoBridge] Fix bridge (#2335) --- bridges/DuckDuckGoBridge.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } }