|
@@ -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",
|
|
|
|
|
- "Cookie: safesearch={$nsfw}; country={$country}; useLocation=0; summarizer=0",
|
|
|
|
|
|
|
+ "Accept-Encoding: gzip, deflate, br, zstd",
|
|
|
|
|
+ "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-User: ?1"
|
|
|
|
|
|
|
+ "Sec-Fetch-Site: same-origin",
|
|
|
|
|
+ "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");
|
|
|
}
|
|
}
|