summaryrefslogtreecommitdiff
path: root/scraper/mojeek.php
diff options
context:
space:
mode:
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;
}