summaryrefslogtreecommitdiff
path: root/scraper/mojeek.php
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/mojeek.php')
-rw-r--r--scraper/mojeek.php32
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