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