From b4f6af4481b3a427aed71139919bb19979f1797d Mon Sep 17 00:00:00 2001 From: vdbhb59 Date: Sat, 19 Apr 2025 22:25:00 +0530 Subject: [PATCH] Synced Hopefully this fixes bing images my fucking god - (https://git.lolcat.ca/lolcat/4get/commit/b85820cbcdde6c0cc64036546ab4c483ed857e3a) fuiwhwehfuiewuf - (https://git.lolcat.ca/lolcat/4get/commit/78aa2e198f11ca928891ec83ef97d2445147414a) --- proxy.php | 12 ++++++------ scraper/ddg.php | 2 +- scraper/qwant.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/proxy.php b/proxy.php index c782a24..e9af8a5 100644 --- a/proxy.php +++ b/proxy.php @@ -80,14 +80,14 @@ try{ switch($_GET["s"]){ - case "portrait": $req = "?w=50&h=90&p=0&qlt=90"; break; - case "landscape": $req = "?w=160&h=90&p=0&qlt=90"; break; - case "square": $req = "?w=90&h=90&p=0&qlt=90"; break; - case "thumb": $req = "?w=236&h=180&p=0&qlt=90"; break; - case "cover": $req = "?w=207&h=270&p=0&qlt=90"; break; + case "portrait": $req = "&w=50&h=90&p=0&qlt=90"; break; + case "landscape": $req = "&w=160&h=90&p=0&qlt=90"; break; + case "square": $req = "&w=90&h=90&p=0&qlt=90"; break; + 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(); } diff --git a/scraper/ddg.php b/scraper/ddg.php index 6231889..c067b04 100644 --- a/scraper/ddg.php +++ b/scraper/ddg.php @@ -1969,7 +1969,7 @@ 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){ diff --git a/scraper/qwant.php b/scraper/qwant.php index 702ffd1..c7e19d6 100644 --- a/scraper/qwant.php +++ b/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); } } \ No newline at end of file