summaryrefslogtreecommitdiff
path: root/scraper/mojeek.php
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2024-02-17 23:22:19 -0500
committerlolcat <will@lolcat.ca>2024-02-17 23:22:19 -0500
commitaddc5a14a93547f630f23e5b6a79cffa2e37d71a (patch)
treea9163ba3a2e24c3c493cdde95e506c0e7e8a772d /scraper/mojeek.php
parentedc917f5ee984160a0eef436dabd51696d675964 (diff)
boobs
Diffstat (limited to 'scraper/mojeek.php')
-rw-r--r--scraper/mojeek.php27
1 files changed, 15 insertions, 12 deletions
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;
}