brave fix fuck you brave

This commit is contained in:
lolcat committed 2026-11-12 11:06:28 -05:00
1 parent aa818ac925
commit 30cd3c8492
1 file changed
+9 -6
+9 -6
View File
@@ -167,17 +167,20 @@ class brave{
$headers = [ $headers = [
"User-Agent: " . config::USER_AGENT, "User-Agent: " . config::USER_AGENT,
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language: en-US,en;q=0.5", "Accept-Language: en-US,en;q=0.5",
"Accept-Encoding: gzip", "Accept-Encoding: gzip, deflate, br, zstd",
"Cookie: safesearch={$nsfw}; country={$country}; useLocation=0; summarizer=0", "Referer: https://search.brave.com/",
"DNT: 1", "DNT: 1",
"Sec-GPC: 1",
"Connection: keep-alive", "Connection: keep-alive",
"Upgrade-Insecure-Requests: 1", "Upgrade-Insecure-Requests: 1",
"Sec-Fetch-Dest: document", "Sec-Fetch-Dest: document",
"Sec-Fetch-Mode: navigate", "Sec-Fetch-Mode: navigate",
"Sec-Fetch-Site: none", "Sec-Fetch-Site: same-origin",
"Sec-Fetch-User: ?1" "Sec-Fetch-User: ?1",
"Priority: u=0, i",
"TE: trailers"
]; ];
$curlproc = curl_init(); $curlproc = curl_init();
@@ -1954,7 +1957,7 @@ class brave{
->getTextContent($title[0]) ->getTextContent($title[0])
); );
if($title == "human verification"){ if($title == "brave search"){
throw new Exception("Brave returned a Captcha"); throw new Exception("Brave returned a Captcha");
} }