aboutsummaryrefslogtreecommitdiffstats
path: root/scraper
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2025-08-06 21:09:33 -0400
committerlolcat <will@lolcat.ca>2025-08-06 21:09:33 -0400
commit27b8509ac0ce0bb0162afa6739b84b4efbed9705 (patch)
tree5737715b7bbc643c96ae399fbcff296dfc0149ed /scraper
parent1e52982cb98130bc4c63e92b882e3940bced3be9 (diff)
fix ddg answer image 404
Diffstat (limited to 'scraper')
-rw-r--r--scraper/ddg.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/scraper/ddg.php b/scraper/ddg.php
index 80bbadd..a1ec939 100644
--- a/scraper/ddg.php
+++ b/scraper/ddg.php
@@ -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
];
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage