From ab57951320d911a89e404dfedbc3869e81159dc2 Mon Sep 17 00:00:00 2001 From: lolcat Date: Sat, 19 Apr 2025 10:37:35 -0400 Subject: [PATCH] hopefully this fixes bing images my fucking god --- src/proxy.php | 6 +++--- src/scraper/ddg.php | 4 ++-- src/scraper/qwant.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/proxy.php b/src/proxy.php index 7ca7415..b5305e5 100644 --- a/src/proxy.php +++ b/src/proxy.php @@ -86,11 +86,11 @@ try{ case "thumb": $req = "?w=236&h=180&p=0&qlt=90"; break; case "cover": $req = "?w=207&h=270&p=0&qlt=90"; break; } - - $proxy->stream_linear_image("https://" . $image["host"] . "/th/id/" . urlencode($id) . $req, "https://www.bing.com"); + + $proxy->stream_linear_image("https://" . $image["host"] . "/th?id=" . rawurlencode($id) . $req, "https://www.bing.com"); die(); } - + // resize image ourselves $payload = $proxy->get($_GET["i"], $proxy::req_image, true); diff --git a/src/scraper/ddg.php b/src/scraper/ddg.php index 72cb72c..bba03af 100644 --- a/src/scraper/ddg.php +++ b/src/scraper/ddg.php @@ -1970,9 +1970,9 @@ class ddg{ $id = $id[1]; } - return "https://" . $image["host"] . "/th/id/" . $id; + return "https://" . $image["host"] . "/th?id=" . rawurlencode($id); } - + private function bingratio($width, $height){ $ratio = [ diff --git a/src/scraper/qwant.php b/src/scraper/qwant.php index 0283c47..27f62dd 100644 --- a/src/scraper/qwant.php +++ b/src/scraper/qwant.php @@ -988,6 +988,6 @@ class qwant{ return $url; } - return "https://" . $image["host"] . "/th/id/" . $id; + return "https://" . $image["host"] . "/th?id=" . rawurlencode($id); } }