aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scraper/mojeek.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/scraper/mojeek.php b/scraper/mojeek.php
index 2939be5..f123b69 100644
--- a/scraper/mojeek.php
+++ b/scraper/mojeek.php
@@ -340,7 +340,7 @@ class mojeek{
"zm" => "Zambia",
"zw" => "Zimbabwe"
]
- ],
+ ],/*
"region" => [
"display" => "Region",
"option" => [
@@ -350,7 +350,7 @@ class mojeek{
"fr" => "France",
"uk" => "United Kingdom"
]
- ],
+ ],*/
"domain" => [
"display" => "Results per domain",
"option" => [
@@ -458,7 +458,7 @@ class mojeek{
"date" => 1, // show date
"tlen" => 128, // max length of title
//"dlen" => 511, // max length of description
- "arc" => ($country == "any" ? "none" : $country) // location. don't use autodetect!
+ //"arc" => ($country == "any" ? "none" : $country) // location. don't use autodetect!
];
switch($focus){
@@ -503,6 +503,11 @@ class mojeek{
}
}
+ if(strlen($html) === 0){
+
+ throw new Exception("Mojeek returned an empty page (probably a homepage redirect)");
+ }
+
$out = [
"status" => "ok",
"spelling" => [
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage