forked from lolcat/4get
fix ddg answer image 404
This commit is contained in:
@@ -1053,13 +1053,15 @@ class ddg{
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var_dump($json);
|
||||||
|
|
||||||
$out["answer"][] = [
|
$out["answer"][] = [
|
||||||
"title" => $json["Heading"],
|
"title" => $json["Heading"],
|
||||||
"description" => $description,
|
"description" => $description,
|
||||||
"url" => $json["AbstractURL"],
|
"url" => $json["AbstractURL"],
|
||||||
"thumb" =>
|
"thumb" =>
|
||||||
(isset($json["Image"]) && $json["Image"]) !== null ?
|
(!isset($json["Image"]) || $json["Image"] == "" || $json["Image"] === null) ?
|
||||||
"https://duckduckgo.com" . $json["Image"] : null,
|
null : "https://duckduckgo.com" . $json["Image"],
|
||||||
"table" => $table,
|
"table" => $table,
|
||||||
"sublink" => $sublinks
|
"sublink" => $sublinks
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user