diff options
author | lolcat <will@lolcat.ca> | 2023-08-08 03:09:47 -0400 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2023-08-08 03:09:47 -0400 |
commit | 4559857380317d768ff8394db711eb5c894aa1f8 (patch) | |
tree | 2ed555b5ba104297642893ef5511d1d28f282842 /scraper/mojeek.php | |
parent | 7c771c82c8e03b337f9f03ae2d4afc25d3f0faca (diff) |
added brave image+video support
Diffstat (limited to 'scraper/mojeek.php')
-rw-r--r-- | scraper/mojeek.php | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/scraper/mojeek.php b/scraper/mojeek.php index a0b5016..e7e8abc 100644 --- a/scraper/mojeek.php +++ b/scraper/mojeek.php @@ -909,6 +909,23 @@ class mojeek{ $a = $a[0]; + $date = + explode( + " - ", + $this->fuckhtml + ->getTextContent( + $this->fuckhtml + ->getElementsByTagName( + "span" + )[0] + ) + ); + + $date = + strtotime( + $date[count($date) - 1] + ); + $out["news"][] = [ "title" => html_entity_decode( @@ -918,20 +935,7 @@ class mojeek{ ) ), "description" => null, - "date" => - strtotime( - explode( - " - ", - $this->fuckhtml - ->getTextContent( - $this->fuckhtml - ->getElementsByTagName( - "span" - )[0] - ), - 2 - )[1] - ), + "date" => $date, "thumb" => [ "url" => null, "ratio" => null |