From 1aff7cef554c7b9633ac94f45a7f5629f2eca0e6 Mon Sep 17 00:00:00 2001 From: vdbhb59 Date: Fri, 17 Jul 2026 12:31:28 +0530 Subject: [PATCH] Yep & DDG fixes - synced https://git.lolcat.ca/lolcat/4get/commit/54d420f97c0b609342b4af704557c807de3c4472 && https://git.lolcat.ca/lolcat/4get/commit/513bb666c54f24b7b985b19195682c8556799410 --- scraper/ddg.php | 2 +- scraper/yep.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scraper/ddg.php b/scraper/ddg.php index 8f68d42..0e5bd8d 100644 --- a/scraper/ddg.php +++ b/scraper/ddg.php @@ -1763,7 +1763,7 @@ class ddg{ if(count($answer) !== 0){ $out["answer"][] = [ - "title" => ucfirst($word), + "title" => ucfirst(rawurldecode($word)), "description" => $answer, "url" => "https://www.wordnik.com/words/" . $word, "thumb" => null, diff --git a/scraper/yep.php b/scraper/yep.php index 2bb9ec0..052ac23 100644 --- a/scraper/yep.php +++ b/scraper/yep.php @@ -249,7 +249,7 @@ class yep{ curl_setopt($curlproc, CURLOPT_HTTPHEADER, ["User-Agent: " . config::USER_AGENT, "Accept: */*", - "Accept-Language: en-US,en;q=0.5", + "Accept-Language: en-US,en;q=0.9", "Accept-Encoding: gzip, deflate, br, zstd", "Referer: https://yep.com/", "Origin: https://yep.com", @@ -259,6 +259,8 @@ class yep{ "Sec-Fetch-Mode: cors", "Sec-Fetch-Site: same-site", "Priority: u=4", + "Pragma: no-cache", + "Cache-Control: no-cache", "TE: trailers"] ); }