Compare commits

..

No commits in common. "36b0c570aaa27cd8ca7d7bc1ec9232339afc5d4e" and "0180cf5224c8287975b1a091612887a9ca0256f6" have entirely different histories.

1 changed files with 31 additions and 46 deletions

View File

@ -403,7 +403,7 @@ class brave{
$nextpage = $nextpage =
$this->fuckhtml $this->fuckhtml
->getElementsByClassName("button", "a"); ->getElementsByClassName("btn", "a");
if(count($nextpage) !== 0){ if(count($nextpage) !== 0){
@ -1777,57 +1777,42 @@ class brave{
$nextpage = $nextpage =
$this->fuckhtml $this->fuckhtml
->getElementById( ->getElementsByClassName("btn", "a");
"pagination",
"div"
);
if($nextpage){ if(count($nextpage) !== 0){
$this->fuckhtml->load($nextpage);
$nextpage = $nextpage =
$this->fuckhtml $nextpage[count($nextpage) - 1];
->getElementsByClassName(
"button", if(
"a" strtolower(
$this->fuckhtml
->getTextContent(
$nextpage
)
) == "next"
){
preg_match(
'/offset=([0-9]+)/',
$this->fuckhtml->getTextContent($nextpage["attributes"]["href"]),
$nextpage
); );
if(count($nextpage) !== 0){ return
$this->backend->store(
$nextpage = json_encode(
$nextpage[count($nextpage) - 1]; [
"q" => $q,
if( "offset" => (int)$nextpage[1],
strtolower( "nsfw" => $nsfw,
$this->fuckhtml "country" => $country,
->getTextContent( "spellcheck" => $spellcheck
$nextpage ]
) ),
) == "next" $page,
){ $proxy
preg_match(
'/offset=([0-9]+)/',
$this->fuckhtml->getTextContent($nextpage["attributes"]["href"]),
$nextpage
); );
return
$this->backend->store(
json_encode(
[
"q" => $q,
"offset" => (int)$nextpage[1],
"nsfw" => $nsfw,
"country" => $country,
"spellcheck" => $spellcheck
]
),
$page,
$proxy
);
}
} }
} }