fixed nasty brave bug

This commit is contained in:
lolcat 2024-06-24 17:15:54 -04:00
parent 75003b6617
commit 640d1d1953
3 changed files with 9 additions and 5 deletions

View file

@ -295,6 +295,7 @@ class brave{
$html = fread($handle, filesize("scraper/brave.html"));
fclose($handle);
*/
try{
$html =
$this->get(
@ -406,9 +407,9 @@ class brave{
if(!isset($grep[1])){
throw new Exception("Could not get data JS");
throw new Exception("Could not grep JavaScript object");
}
$data =
$this->fuckhtml
->parseJsObject(
@ -416,6 +417,11 @@ class brave{
);
unset($grep);
if($data === null){
throw new Exception("Failed to decode JavaScript object");
}
$data = $data[1]["data"]["body"]["response"];
/*