mirror of
https://git.lolcat.ca/lolcat/4get.git
synced 2024-12-03 23:42:16 -05:00
fixed greppr
This commit is contained in:
parent
4e4796bb71
commit
beb08f46e2
1 changed files with 13 additions and 7 deletions
|
@ -298,9 +298,8 @@ class greppr{
|
|||
|
||||
$description =
|
||||
$this->fuckhtml
|
||||
->getElementsByFuzzyAttributeValue(
|
||||
"style",
|
||||
"color:#777777;",
|
||||
->getElementsByClassName(
|
||||
"highlightedDesc",
|
||||
"p"
|
||||
);
|
||||
|
||||
|
@ -310,9 +309,11 @@ class greppr{
|
|||
}else{
|
||||
|
||||
$description =
|
||||
$this->limitstrlen(
|
||||
$this->fuckhtml
|
||||
->getTextContent(
|
||||
$description[0]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -325,7 +326,7 @@ class greppr{
|
|||
$date =
|
||||
strtotime(
|
||||
explode(
|
||||
"Added:",
|
||||
":",
|
||||
$this->fuckhtml
|
||||
->getTextContent(
|
||||
$date[count($date) - 1]["innerHTML"]
|
||||
|
@ -426,4 +427,9 @@ class greppr{
|
|||
|
||||
return $tokens;
|
||||
}
|
||||
|
||||
private function limitstrlen($text){
|
||||
|
||||
return explode("\n", wordwrap($text, 300, "\n"))[0];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue