Clean up published extraction

pull/3/head
Omar Roth 2018-06-02 19:57:45 -05:00
rodzic 36ba69be1f
commit 6d0079e886
1 zmienionych plików z 2 dodań i 6 usunięć

Wyświetl plik

@ -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