diff --git a/scraper/ddg.php b/scraper/ddg.php index 9ef50c8..6924087 100644 --- a/scraper/ddg.php +++ b/scraper/ddg.php @@ -525,6 +525,15 @@ class ddg{ if(isset($item["c"])){ + if( + !isset($item["s"]) && + isset($item["t"]) && + $item["t"] == "DEEP_ERROR_NO_RESULTS" + ){ + + return $out; + } + $table = []; // get youtube video information @@ -1049,8 +1058,8 @@ class ddg{ "description" => $description, "url" => $json["AbstractURL"], "thumb" => - (isset($json["Image"]) && $json["Image"]) !== null ? - "https://duckduckgo.com" . $json["Image"] : null, + (!isset($json["Image"]) || $json["Image"] == "" || $json["Image"] === null) ? + null : "https://duckduckgo.com" . $json["Image"], "table" => $table, "sublink" => $sublinks ];