diff options
| author | lolcat <will@lolcat.ca> | 2026-06-21 22:15:27 -0400 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-07-06 21:32:18 -0700 |
| commit | 2ab2b8717bd3390a265641d62bef1bae408875c1 (patch) | |
| tree | 2d5f938ea1f3a8e16abd12a8df951c81f7d035e8 | |
| parent | 901c4d0897d0486db8e94bee244ab1728e4ed3d1 (diff) | |
for some reason mojeek doesnt want me using region settings anymore lol
| -rw-r--r-- | scraper/mojeek.php | 11 |
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" => [ |
