Compare commits
4 Commits
088e64f37d
...
16f954f1e5
Author | SHA1 | Date | |
---|---|---|---|
16f954f1e5
|
|||
![]() |
f7db6ba295
|
||
![]() |
8bea7758f0
|
||
![]() |
b794dcbcd3
|
@@ -24,7 +24,7 @@ class anubis{
|
||||
"script"
|
||||
);
|
||||
|
||||
if(count($script) === 0){
|
||||
if($script === false){
|
||||
|
||||
throw new Exception("Failed to scrape anubis challenge data");
|
||||
}
|
||||
|
@@ -719,7 +719,7 @@ class ddg{
|
||||
->getTextContent(
|
||||
$json["suggestion"]
|
||||
),
|
||||
"correction" => $json["recourseText"]
|
||||
"correction" => html_entity_decode($json["recourseText"])
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -317,14 +317,19 @@ class marginalia{
|
||||
//
|
||||
// Bypass anubis check
|
||||
//
|
||||
/*
|
||||
if(($anubis_key = apcu_fetch("marginalia_cookie")) === false){
|
||||
|
||||
try{
|
||||
$html =
|
||||
$this->get(
|
||||
$proxy,
|
||||
"https://old-search.marginalia.nu/"
|
||||
"https://old-search.marginalia.nu/search",
|
||||
[
|
||||
"query" => $search
|
||||
]
|
||||
);
|
||||
|
||||
}catch(Exception $error){
|
||||
|
||||
throw new Exception("Failed to get anubis challenge");
|
||||
@@ -361,7 +366,7 @@ class marginalia{
|
||||
}
|
||||
|
||||
apcu_store("marginalia_cookie", $anubis_key);
|
||||
}
|
||||
}*/
|
||||
|
||||
if($get["npt"]){
|
||||
|
||||
@@ -377,7 +382,7 @@ class marginalia{
|
||||
$proxy,
|
||||
"https://old-search.marginalia.nu/search?" . $params,
|
||||
[],
|
||||
$anubis_key
|
||||
//$anubis_key
|
||||
);
|
||||
}catch(Exception $error){
|
||||
|
||||
@@ -408,7 +413,7 @@ class marginalia{
|
||||
$proxy,
|
||||
"https://old-search.marginalia.nu/search",
|
||||
$params,
|
||||
$anubis_key
|
||||
//$anubis_key
|
||||
);
|
||||
}catch(Exception $error){
|
||||
|
||||
|
@@ -84,7 +84,7 @@ if($results["spelling"]["type"] != "no_correction"){
|
||||
'&' .
|
||||
$frontend->buildquery($get, true) .
|
||||
'&spellcheck=no">' .
|
||||
$results["spelling"]["correction"] .
|
||||
htmlspecialchars($results["spelling"]["correction"]) .
|
||||
'</a>?' .
|
||||
'</div>';
|
||||
}
|
||||
|
Reference in New Issue
Block a user