Merge pull request #6 from codedipper/main

fix ddg search when zero-click (wikipedia) result is present
This commit is contained in:
Ahwxorg 2023-08-15 18:52:50 +02:00 committed by GitHub
commit 70dff6cb1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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