From addc5a14a93547f630f23e5b6a79cffa2e37d71a Mon Sep 17 00:00:00 2001 From: lolcat Date: Sat, 17 Feb 2024 23:22:19 -0500 Subject: boobs --- scraper/mojeek.php | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'scraper/mojeek.php') diff --git a/scraper/mojeek.php b/scraper/mojeek.php index d17158b..934e455 100644 --- a/scraper/mojeek.php +++ b/scraper/mojeek.php @@ -602,20 +602,23 @@ class mojeek{ ); } - $data["date"] = - explode( - " - ", - $this->fuckhtml - ->getTextContent( - $this->fuckhtml - ->getElementsByClassName("i", "p")[0] - ) + $date = + $this->fuckhtml + ->getElementsByClassName( + "mdate", + "span" ); - $data["date"] = - strtotime( - $data["date"][count($data["date"]) - 1] - ); + if(count($date) !== 0){ + + $data["date"] = + strtotime( + $this->fuckhtml + ->getTextContent( + $date[0] + ) + ); + } $out["web"][] = $data; } -- cgit v1.2.3