fix ddg answer image 404
This commit is contained in:
parent
1e52982cb9
commit
27b8509ac0
|
@ -1053,13 +1053,15 @@ class ddg{
|
|||
];
|
||||
}
|
||||
|
||||
var_dump($json);
|
||||
|
||||
$out["answer"][] = [
|
||||
"title" => $json["Heading"],
|
||||
"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
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue