Synced
This commit is contained in:
parent
b198314f42
commit
ebd1033251
1 changed files with 9 additions and 4 deletions
|
|
@ -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" => [
|
||||
|
|
@ -1190,4 +1195,4 @@ class mojeek{
|
|||
|
||||
return trim($title, ". \t\n\r\0\x0B");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue