aboutsummaryrefslogtreecommitdiffstats
path: root/scraper/ghostery.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2024-09-01 20:35:21 -0400
committerlolcat <will@lolcat.ca>2024-09-01 20:35:21 -0400
commitc9eec8260bbbe14015cf6acf1946dc8218d20b74 (patch)
treee3cb723634fc4bf2ac351fb28f4c818446920502 /scraper/ghostery.php
parent063397dbd1019b8586b2e12af06a97712d48af28 (diff)
added solofield
Diffstat (limited to 'scraper/ghostery.php')
-rw-r--r--scraper/ghostery.php44
1 files changed, 28 insertions, 16 deletions
diff --git a/scraper/ghostery.php b/scraper/ghostery.php
index 9492f4b..394756e 100644
--- a/scraper/ghostery.php
+++ b/scraper/ghostery.php
@@ -130,26 +130,38 @@ class ghostery{
$query = http_build_query($query);
- $html =
- $this->get(
- $proxy,
- "https://ghosterysearch.com/search?" . $query,
- [],
- $country
- );
+ try{
+
+ $html =
+ $this->get(
+ $proxy,
+ "https://ghosterysearch.com/search?" . $query,
+ [],
+ $country
+ );
+ }catch(Exception $error){
+
+ throw new Exception("Failed to fetch search page");
+ }
}else{
$proxy = $this->backend->get_ip();
- $html =
- $this->get(
- $proxy,
- "https://ghosterysearch.com/search",
- [
- "q" => $get["s"]
- ],
- $get["country"]
- );
+ try{
+
+ $html =
+ $this->get(
+ $proxy,
+ "https://ghosterysearch.com/search",
+ [
+ "q" => $get["s"]
+ ],
+ $get["country"]
+ );
+ }catch(Exception $error){
+
+ throw new Exception("Failed to fetch search page");
+ }
}
$out = [
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage