mirror of
https://github.com/iv-org/invidious.git
synced 2025-01-08 22:07:05 +00:00
RSS: return 404 if youtube playlist doesnt exist
This commit is contained in:
parent
9892604758
commit
6dd89bd401
@ -309,8 +309,9 @@ module Invidious::Routes::Feeds
|
|||||||
end
|
end
|
||||||
|
|
||||||
response = YT_POOL.client &.get("/feeds/videos.xml?playlist_id=#{plid}")
|
response = YT_POOL.client &.get("/feeds/videos.xml?playlist_id=#{plid}")
|
||||||
document = XML.parse(response.body)
|
return error_atom(404, NotFoundException.new("Playlist does not exist.")) if response.status_code == 404
|
||||||
|
|
||||||
|
document = XML.parse(response.body)
|
||||||
document.xpath_nodes(%q(//*[@href]|//*[@url])).each do |node|
|
document.xpath_nodes(%q(//*[@href]|//*[@url])).each do |node|
|
||||||
node.attributes.each do |attribute|
|
node.attributes.each do |attribute|
|
||||||
case attribute.name
|
case attribute.name
|
||||||
|
Loading…
Reference in New Issue
Block a user