summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2023-11-07 09:24:14 -0500
committerlolcat <will@lolcat.ca>2023-11-07 09:24:14 -0500
commit61ef9561202f71af83e51d436a7c906a9ac777bf (patch)
treef1f229da863aba1c9dcce3ca59c9d2bb656df1b0
parent7e893a15c129f2b69527fbda032de85491fc20b2 (diff)
remove debug print
-rw-r--r--scraper/mojeek.php22
-rw-r--r--scraper/wiby.php2
2 files changed, 12 insertions, 12 deletions
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{
diff --git a/scraper/wiby.php b/scraper/wiby.php
index e8351bc..2d79c56 100644
--- a/scraper/wiby.php
+++ b/scraper/wiby.php
@@ -45,8 +45,6 @@ class wiby{
$url .= "?" . $get;
}
- print_r([$proxy, $url]);
-
curl_setopt($curlproc, CURLOPT_URL, $url);
curl_setopt($curlproc, CURLOPT_ENCODING, ""); // default encoding