diff options
author | lolcat <will@lolcat.ca> | 2024-05-16 17:22:49 -0400 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2024-05-16 17:22:49 -0400 |
commit | 0d98d7839d1c3da75b95ef29ce12ef54a2a20094 (patch) | |
tree | c51d5a0dcfc99d91211b65ed9692974305a72c90 /lib | |
parent | f8d46df1e858401d93c5fa885777113994a03c86 (diff) |
added greppr support also btw im not dead
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backend.php | 6 | ||||
-rw-r--r-- | lib/frontend.php | 1 | ||||
-rw-r--r-- | lib/fuckhtml.php | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/backend.php b/lib/backend.php index 7631ff3..cfb04a9 100644 --- a/lib/backend.php +++ b/lib/backend.php @@ -36,7 +36,7 @@ class backend{ } // this function is also called directly on nextpage - public function assign_proxy(&$curlproc, $ip){ + public function assign_proxy(&$curlproc, string $ip){ // parse proxy line [ @@ -91,7 +91,7 @@ class backend{ /* Next page stuff */ - public function store($payload, $page, $proxy){ + public function store(string $payload, string $page, string $proxy){ $key = sodium_crypto_secretbox_keygen(); $nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES); @@ -120,7 +120,7 @@ class backend{ rtrim(strtr(base64_encode($key), '+/', '-_'), '='); } - public function get($npt, $page){ + public function get(string $npt, string $page){ $page = $page[0]; $explode = explode(".", $npt, 2); diff --git a/lib/frontend.php b/lib/frontend.php index a48b722..1c3eb09 100644 --- a/lib/frontend.php +++ b/lib/frontend.php @@ -925,6 +925,7 @@ class frontend{ "google" => "Google", "qwant" => "Qwant", "yep" => "Yep", + "greppr" => "Greppr", "crowdview" => "Crowdview", "mwmbl" => "Mwmbl", "mojeek" => "Mojeek", diff --git a/lib/fuckhtml.php b/lib/fuckhtml.php index 6895fbf..f3a6efe 100644 --- a/lib/fuckhtml.php +++ b/lib/fuckhtml.php @@ -321,11 +321,11 @@ class fuckhtml{ throw new Exception("(getTextContent) Supplied array doesn't contain an innerHTML index"); } + $html = $html["innerHTML"]; } - $html = - preg_split('/\n|<\/?br>/i', $html); + $html = preg_split('/\n|<\/?br>/i', $html); $out = ""; for($i=0; $i<count($html); $i++){ |