Ver Fonte

brave fix fuck you brave

lolcat há 19 horas atrás
pai
commit
30cd3c8492
1 ficheiros alterados com 9 adições e 6 exclusões
  1. 9 6
      scraper/brave.php

+ 9 - 6
scraper/brave.php

@@ -167,17 +167,20 @@ class brave{
 		
 		$headers = [
 			"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-Encoding: gzip",
-			"Cookie: safesearch={$nsfw}; country={$country}; useLocation=0; summarizer=0",
+			"Accept-Encoding: gzip, deflate, br, zstd",
+			"Referer: https://search.brave.com/",
 			"DNT: 1",
+			"Sec-GPC: 1",
 			"Connection: keep-alive",
 			"Upgrade-Insecure-Requests: 1",
 			"Sec-Fetch-Dest: document",
 			"Sec-Fetch-Mode: navigate",
-			"Sec-Fetch-Site: none",
-			"Sec-Fetch-User: ?1"
+			"Sec-Fetch-Site: same-origin",
+			"Sec-Fetch-User: ?1",
+			"Priority: u=0, i",
+			"TE: trailers"
 		];
 		
 		$curlproc = curl_init();
@@ -1954,7 +1957,7 @@ class brave{
 				->getTextContent($title[0])
 			);
 		
-		if($title == "human verification"){
+		if($title == "brave search"){
 			
 			throw new Exception("Brave returned a Captcha");
 		}