Compare commits

..

No commits in common. "cf686202e05cfdce708a4d0d37a18a055f43a1df" and "c005ada48723808e507d0a4d5a3363a1c14a4f07" have entirely different histories.

View File

@ -407,23 +407,14 @@ module Invidious::Routes::Feeds
end end
spawn do spawn do
# TODO: unify this with the other almost identical looking parts in this and channels.cr somehow? rss = XML.parse_html(body)
namespaces = { rss.xpath_nodes("//feed/entry").each do |entry|
"yt" => "http://www.youtube.com/xml/schemas/2015", id = entry.xpath_node("videoid").not_nil!.content
"default" => "http://www.w3.org/2005/Atom", author = entry.xpath_node("author/name").not_nil!.content
} published = Time.parse_rfc3339(entry.xpath_node("published").not_nil!.content)
rss = XML.parse(body) updated = Time.parse_rfc3339(entry.xpath_node("updated").not_nil!.content)
rss.xpath_nodes("//default:feed/default:entry", namespaces).each do |entry|
id = entry.xpath_node("yt:videoId", namespaces).not_nil!.content
author = entry.xpath_node("default:author/default:name", namespaces).not_nil!.content
published = Time.parse_rfc3339(entry.xpath_node("default:published", namespaces).not_nil!.content)
updated = Time.parse_rfc3339(entry.xpath_node("default:updated", namespaces).not_nil!.content)
begin video = get_video(id, force_refresh: true)
video = get_video(id, force_refresh: true)
rescue
next # skip this video since it raised an exception (e.g. it is a scheduled live event)
end
if CONFIG.enable_user_notifications if CONFIG.enable_user_notifications
# Deliver notifications to `/api/v1/auth/notifications` # Deliver notifications to `/api/v1/auth/notifications`