mirror of
https://git.bakhai.co.in/FbIN/4Get.git
synced 2025-11-05 12:31:30 +05:30
Synced
fix ddg returning weird reresults when no match is found (1e52982cb9) fix ddg answer image 404 (27b8509ac0) (f33f02e816)
This commit is contained in:
parent
099d57f352
commit
f6054b1683
1 changed files with 11 additions and 2 deletions
|
|
@ -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
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue