[DuckDuckGoBridge] Fix bridge (#2335)

This commit is contained in:
Joseph 2022-01-15 05:24:13 +00:00 committed by GitHub
parent c65feffb61
commit 607d9297ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}