Fix date parsing for RSS feeds

This commit is contained in:
Omar Roth 2019-03-07 21:13:54 -06:00
parent 10abcd519f
commit ae10052aaf
2 changed files with 6 additions and 6 deletions

View file

@ -112,8 +112,8 @@ def fetch_channel(ucid, db, pull_all_videos = true, locale = nil)
rss.xpath_nodes("//feed/entry").each do |entry|
video_id = entry.xpath_node("videoid").not_nil!.content
title = entry.xpath_node("title").not_nil!.content
published = Time.parse(entry.xpath_node("published").not_nil!.content, "%FT%X%z", Time::Location.local)
updated = Time.parse(entry.xpath_node("updated").not_nil!.content, "%FT%X%z", Time::Location.local)
published = Time.parse_rfc3339(entry.xpath_node("published").not_nil!.content)
updated = Time.parse_rfc3339(entry.xpath_node("updated").not_nil!.content)
author = entry.xpath_node("author/name").not_nil!.content
ucid = entry.xpath_node("channelid").not_nil!.content