fix when ads sometimes show up with ddg

This commit is contained in:
Revvy 2023-08-29 21:58:27 -04:00
parent 8f9b9803f2
commit 46fe062bd3
No known key found for this signature in database
GPG key ID: 1846DE3699085927

View file

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