duckduckgo fix
This commit is contained in:
1 parent
0e5258a1b9
commit
f2fe2a5ba6
1 file changed
+37
-2
+37
-2
@@ -372,13 +372,14 @@ class ddg{
|
||||
}else{
|
||||
|
||||
// temporary fix
|
||||
return $this->web_html($get);
|
||||
//return $this->web_html($get);
|
||||
|
||||
// we have $get["s"]
|
||||
if(
|
||||
strpos($get["s"], "email") !== false || // contains word "email" ?? lol
|
||||
strpos($get["s"], "\"") !== false || // contains quotes
|
||||
strpos($get["s"], ":") !== false // contains potential site: operator or whatever the fuck
|
||||
strpos($get["s"], ":") !== false || // contains potential site: operator or whatever the fuck
|
||||
strpos($get["s"], "@") !== false // contains @
|
||||
){
|
||||
|
||||
return $this->web_html($get);
|
||||
@@ -1117,12 +1118,46 @@ class ddg{
|
||||
if(isset($item["n"])){
|
||||
|
||||
// get NPT
|
||||
/*
|
||||
$out["npt"] =
|
||||
$this->backend->store(
|
||||
"1," . $item["n"],
|
||||
"web",
|
||||
$proxy
|
||||
);*/
|
||||
|
||||
$items = parse_url($item["n"]);
|
||||
|
||||
if(isset($items["query"])){
|
||||
|
||||
parse_str($items["query"], $items);
|
||||
|
||||
$payload = [
|
||||
"q" => $items["q"],
|
||||
"s" => "10",
|
||||
"nextParams" => "",
|
||||
"v" => "l",
|
||||
"o" => "json",
|
||||
"dc" => "11",
|
||||
"api" => "d.js",
|
||||
"vqd" => $items["vqd"],
|
||||
"kl" => $get_filters["kl"],
|
||||
"q" => $items["q"]
|
||||
];
|
||||
|
||||
if(isset($get_filters["df"])){
|
||||
|
||||
$payload["df"] = $get_filters["df"];
|
||||
}
|
||||
|
||||
$out["npt"] =
|
||||
$this->backend->store(
|
||||
"0," . json_encode($payload),
|
||||
"web",
|
||||
$proxy
|
||||
);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user