mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Clean up published extraction
This commit is contained in:
parent
36ba69be1f
commit
6d0079e886
1 changed files with 2 additions and 6 deletions
|
@ -224,12 +224,8 @@ def fetch_video(id, client)
|
||||||
raise "Could not find date published"
|
raise "Could not find date published"
|
||||||
end
|
end
|
||||||
|
|
||||||
published = published.lchop("Published ")
|
published = published.split(" ")
|
||||||
published = published.lchop("Started streaming ")
|
published = published[-3..-1].join(" ")
|
||||||
published = published.lchop("Streamed live ")
|
|
||||||
published = published.lchop("Uploaded ")
|
|
||||||
published = published.lchop("on ")
|
|
||||||
published = published.lchop("Scheduled for ")
|
|
||||||
if !published.includes?("ago")
|
if !published.includes?("ago")
|
||||||
published = Time.parse(published, "%b %-d, %Y")
|
published = Time.parse(published, "%b %-d, %Y")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue