aboutsummaryrefslogtreecommitdiffstats
path: root/scraper/ghostery.php
diff options
context:
space:
mode:
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