mirror of
https://git.lolcat.ca/lolcat/4get.git
synced 2024-12-24 23:56:34 -05:00
ddg hotfix
This commit is contained in:
parent
0a43b9c849
commit
9ca93f34c6
1 changed files with 23 additions and 9 deletions
|
@ -693,7 +693,11 @@ class ddg{
|
||||||
|
|
||||||
$out["spelling"] = [
|
$out["spelling"] = [
|
||||||
"type" => $type,
|
"type" => $type,
|
||||||
"using" => $json["suggestion"],
|
"using" =>
|
||||||
|
$this->fuckhtml
|
||||||
|
->getTextContent(
|
||||||
|
$json["suggestion"]
|
||||||
|
),
|
||||||
"correction" => $json["recourseText"]
|
"correction" => $json["recourseText"]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1147,17 +1151,27 @@ class ddg{
|
||||||
|
|
||||||
foreach($snippet["citations"] as $citation){
|
foreach($snippet["citations"] as $citation){
|
||||||
|
|
||||||
$push[] = [
|
if(!isset($citation["cite"])){ continue; }
|
||||||
"type" => "quote",
|
|
||||||
"value" =>
|
$text =
|
||||||
$this->fuckhtml
|
$this->fuckhtml
|
||||||
->getTextContent(
|
->getTextContent(
|
||||||
$citation["cite"]
|
$citation["cite"]
|
||||||
) . " - " .
|
);
|
||||||
|
|
||||||
|
if(isset($citation["source"])){
|
||||||
|
|
||||||
|
$text .=
|
||||||
|
" - " .
|
||||||
$this->fuckhtml
|
$this->fuckhtml
|
||||||
->getTextContent(
|
->getTextContent(
|
||||||
$citation["source"]
|
$citation["source"]
|
||||||
)
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$push[] = [
|
||||||
|
"type" => "quote",
|
||||||
|
"value" => $text
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue