diff --git a/scraper/brave.php b/scraper/brave.php index 45e2334..7a0839c 100644 --- a/scraper/brave.php +++ b/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"); }