LibreY- privacy respecting meta search engine |
git clone git://git.acid.vegas/LibreY.git |
Log | Files | Refs | Archive | README | LICENSE |
commit 0f50470821dcef072cf0b11fbab5cc2ddccbe2e5
parent 8f9b9803f231e2954e5b49987a532d28fe50a627 Author: Ahwx <ahwx@ahwx.org> Date: Wed, 30 Aug 2023 22:46:08 +0200 fix: ads sometimes show up with ddg (merge pull request #32 from codedipper/ad-ddg-fix) fix when ads sometimes show up with ddg Diffstat:
|
1 file changed, 1 insertion(+), 1 deletion(-) |
diff --git a/engines/text/duckduckgo.php b/engines/text/duckduckgo.php @@ -26,7 +26,7 @@ $results = array(); $xpath = get_xpath(curl_multi_getcontent($this->ch)); - foreach($xpath->query("/html/body/div[1]/div[". count($xpath->query('/html/body/div[1]/div')) ."]/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[contains(@class, 'web-result')]/div") as $result) { $url = $xpath->evaluate(".//h2[@class='result__title']//a/@href", $result)[0]; |