Compare commits

...

3 Commits

Author SHA1 Message Date
lolcat
f33f02e816 so fucking dumb 2025-08-06 21:10:58 -04:00
lolcat
27b8509ac0 fix ddg answer image 404 2025-08-06 21:09:33 -04:00
lolcat
1e52982cb9 fix ddg returning weird reresults when no match is found 2025-08-06 20:19:13 -04:00

View File

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