summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-06-02 19:57:45 -0500
committerOmar Roth <omarroth@hotmail.com>2018-06-02 19:57:45 -0500
commit6d0079e886048fe72eaee48fd29ca9bd10a1b5a5 (patch)
treeaf2b875f718d05c1670acad16c9f1200c10bec7f /src
parent36ba69be1fc04e5df9757c5d933a52e71a39c561 (diff)
downloadinvidious-6d0079e886048fe72eaee48fd29ca9bd10a1b5a5.tar.gz
invidious-6d0079e886048fe72eaee48fd29ca9bd10a1b5a5.tar.bz2
invidious-6d0079e886048fe72eaee48fd29ca9bd10a1b5a5.zip
Clean up published extraction
Diffstat (limited to 'src')
-rw-r--r--src/helpers.cr8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/helpers.cr b/src/helpers.cr
index 040f09fe..3205176f 100644
--- a/src/helpers.cr
+++ b/src/helpers.cr
@@ -224,12 +224,8 @@ def fetch_video(id, client)
raise "Could not find date published"
end
- published = published.lchop("Published ")
- published = published.lchop("Started streaming ")
- published = published.lchop("Streamed live ")
- published = published.lchop("Uploaded ")
- published = published.lchop("on ")
- published = published.lchop("Scheduled for ")
+ published = published.split(" ")
+ published = published[-3..-1].join(" ")
if !published.includes?("ago")
published = Time.parse(published, "%b %-d, %Y")
else