diff --git a/engines/duckduckgo/text.php b/engines/duckduckgo/text.php index de8d317..86e06f0 100644 --- a/engines/duckduckgo/text.php +++ b/engines/duckduckgo/text.php @@ -115,7 +115,7 @@ $xpath = get_xpath(curl_multi_getcontent($google_ch)); - foreach($xpath->query('/html/body/div[1]/div[3]/div/div/div/div') as $result) + foreach($xpath->query("/html/body/div[1]/div[". count($xpath->query('/html/body/div[1]/div')) ."]/div/div/div/div") as $result) { $url = $xpath->evaluate(".//h2[@class='result__title']//a/@href", $result)[0];