From 4559857380317d768ff8394db711eb5c894aa1f8 Mon Sep 17 00:00:00 2001 From: lolcat Date: Tue, 8 Aug 2023 03:09:47 -0400 Subject: added brave image+video support --- scraper/mojeek.php | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'scraper/mojeek.php') 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 -- cgit v1.2.3