From 61ef9561202f71af83e51d436a7c906a9ac777bf Mon Sep 17 00:00:00 2001 From: lolcat Date: Tue, 7 Nov 2023 09:24:14 -0500 Subject: remove debug print --- scraper/mojeek.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'scraper/mojeek.php') diff --git a/scraper/mojeek.php b/scraper/mojeek.php index 3d91c09..c492a20 100644 --- a/scraper/mojeek.php +++ b/scraper/mojeek.php @@ -437,18 +437,20 @@ class mojeek{ } }else{ + $search = $get["s"]; + if(strlen($search) === 0){ + + throw new Exception("Search term is empty!"); + } + + $proxy = $this->backend->get_ip(); $lang = $get["lang"]; $country = $get["country"]; $region = $get["region"]; $domain = $get["domain"]; $focus = $get["focus"]; - if(strlen($search) === 0){ - - throw new Exception("Search term is empty!"); - } - $params = [ "q" => $search, "t" => 20, // number of results/page @@ -488,8 +490,6 @@ class mojeek{ $params["si"] = $domain; } - $proxy = $this->backend->get_ip(); - try{ $html = $this->get( @@ -1119,9 +1119,11 @@ class mojeek{ // parse big node information $data["author"] = - $this->fuckhtml - ->getTextContent( - $a[0]["innerHTML"] + htmlspecialchars_decode( + $this->fuckhtml + ->getTextContent( + $a[0]["innerHTML"] + ) ); }else{ -- cgit v1.2.3