FEATURE REQUEST: Can NNW deduce an RSS feed from a youtube video URL?
I know I'm asking for a heuristic that will eventually break. But I would like to be able to add a feed in NNW and paste a URL pointing at a youtube video, and have NNW:
- search source code of web page for "channel_id="
- take the ID string that follows the =
- and create a feed url like: https://www.youtube.com/feeds/videos.xml?channel_id=$ID
That would let me simply and easily subscribe to youtube channels in NNW.
I'm not sure if this has already been suggested, but it seems valuable, even thought it encodes an implementation detail of the youtube pages.
It looks like openrss.org should what I want if I use NNW to subscribe to a feed with openrss.org at the start, but it doesn't seem to work.
I've been using open rss. it basically does what you're asking. when you on any youtube video, just add openrss.org to front of youtube channel URL and it will generate the rss feed for the youtube channel.
It seems like openrss.org should do what I want. But I can't get it to work f'or YouTube.
FWIW: The main "channel" page on you tube doesn't have the channel_id anywhere in the source. To get the channel_id you have to look at the source code for one of the videos on the channel.
When I use openrss on either the YouTube channel page or one of the videos on the channel, it doesn't seem to work. Does openrrs work for you with YouTube?
what is the channel? i can check to see if it work for you
https://openrss.org/www.youtube.com/@NickHeinOfficialPage/videos is the RSS feed for https://www.youtube.com/@NickHeinOfficialPage/videos. That works for me.
I just tried a random video https://www.youtube.com/watch?v=SlEByKfcNmk
But now that I read more I think openers is not what I want. I don't need a feed to be created on a third party site. The feed already exists in YouTube, but there is no button or page that links to the rss feed. So I need to use a few steps to create the correct url.
I tried pasting the feed URL you showed into NetNewsWire and it said "no feed" So something weird is happening for me.
Oh NetNewsWire is probably blocking open rss. The feed works for me in Inoreader and just tried in Feedbin and works as well. Sounds like there is something going on with NetNewsWire. will have to wait until developer fixes it i guess
Literally, I just want NNW to run this command for me on youtube URLS that don't look like feeds.
` % youtuberss "https://www.youtube.com/watch?v=hjer379ONJo" https://www.youtube.com/feeds/videos.xml?channel_id=UCEbFX3P9ADiJvle5Z0Qyw2A
% which youtuberss youtuberss () { id=$(curl -s "$1" | grep channelId | head -1 | sed -e 's/.channelId":"//' -e 's/",".//') echo "https://www.youtube.com/feeds/videos.xml?channel_id=$id" } `
noembed might work since it can give you the channel URL from a video, but you still need to look through the video page.
So given video https://www.youtube.com/watch?v=SlEByKfcNmk you can query noembed like this:
https://noembed.com/embed?url=https://www.youtube.com/watch?v=SlEByKfcNmk
You'll get this JSON containing author url you can use
{"thumbnail_height":360,"version":"1.0","url":"https://www.youtube.com/watch?v=SlEByKfcNmk","thumbnail_width":480,"width":200,"provider_name":"YouTube","type":"video","height":113,"provider_url":"https://www.youtube.com/","html":"<iframe width=\"200\" height=\"113\" src=\"https://www.youtube.com/embed/SlEByKfcNmk?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen title=\"The Fifth Element - 1950's Super Panavision 70\"></iframe>","author_url":"https://www.youtube.com/@AIFlickNips","author_name":"AI FlickNips","thumbnail_url":"https://i.ytimg.com/vi/SlEByKfcNmk/hqdefault.jpg","title":"The Fifth Element - 1950's Super Panavision 70"}
When pasting the URL to a channel, NetNewsWire already discovers and follows the underlying RSS feed of that channel.
For example, if you follow this channel in NetNewsWire: https://www.youtube.com/@engineerguyvideo
Then NNW will parse that web page, finds <link rel="alternate" type="application/rss+xml" title="RSS" href="https://www.youtube.com/feeds/videos.xml?channel_id=UC2bkHVIDjXS7sgrgjFtzOXQ">, and subscribes to https://www.youtube.com/feeds/videos.xml?channel_id=UC2bkHVIDjXS7sgrgjFtzOXQ.
However, you need to follow the "channel" page, not an individual "video" page. It's not clear what it means to follow an individual video. I suppose it might mean to subscribe to new comments, but YouTube don't provide an official feed for that yet (e.g. like WordPress does).
If you're unsure how to get the channel URL from the app or site, without any coding or tricks, I wrote a how-to about this.
When I try to follow this URL: https://www.youtube.com/@DanReederMusic I get a feed with a bunch of TED-Ed videos in it. When I "Copy Feed URL" from the NNW feed I get: http://gdata.youtube.com/feeds/base/users/TEDEducation/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile Maybe the behavior is different if I am (or am not) actually subscribed to the channel in youtube? I am not normally subscribed to anything in youtube, since that's the point of NNW.
@cquenelle Try and add it without the '@'
https://m.youtube.com/DanReederMusic
This works for me:
It actually also worked for me with your link:
https://www.youtube.com/@DanReederMusic
I'm not sure if it makes a difference, but I'm using the Mac platform not iOS. When I try the urls you suggested (with and without the @) NNW tells me "no feed found". I suspect iOS (and not macos) is automatically processing the URL in some way trying to be helpful.
When I click on the name of the channel I get an URL like: https://www.youtube.com/channel/UCZQVGv2GGRSOeVTQMYoru2A So that's what I would prefer to put into NNW. Is there some other part of the youtube UI that is giving you an URL like https://www.youtube.com/DanReederMusic Obviously I can try constructing it by hand, which is a step up from using a funky script like I started with at the beginning of this thread. But ideally there would be someplace on the youtube page I could say "copy link" and then go to NNW and say "add feed".
@cquenelle, i drag a channel link - such as the first link in your message - into the NNW feed list and it just works. Or if one prefers not to drag, one can copy the URL, then in NNW, type Cmd+N for "New Feed" and the correct URL will be pasted into the dialog. Does that cover it? From an individual video's page, I drag the name of the channel underneath the video (the link that would go to the main channel page). that works when dragged to NNW
I pretty sure I'm doing the same actions you are, but for me I get a different result. My NNW version is 6.1.9 (6135) My MacOS version is Sequoia 15.5
I'm running the same app & OS versions as you. For example the link to the channel page for Veritasium is: https://www.youtube.com/@veritasium if i copy that URL (to the clipboard), then select "New Feed" in NNW, i get this:
- i.e. it automatically enters the URL in the dialog. I press the Enter key, and the feed is added. It loads & updates
I'm doing exactly what you're doing, but I get a different result. The page that youtube is sending me must be different than what it's sending you. Can you tell me where in the NNW source code it's parsing the youtube page to find the feed URL? Or maybe attach the output of "curl -s $URL" for one of the urls you're using to test with? I can compare it with what I'm getting for the same URL.
Maybe the behavior is different if I am (or am not) actually subscribed to the channel in youtube? I am not normally subscribed to anything in youtube, since that's the point of NNW
i tried copying the URL into NNW for a channel I don't subscribe to, and that still worked for me. so it doesn't seem that subscribing to the channel makes a difference.
Can you tell me where in the NNW source code it's parsing the youtube page
short answer - i don't know. to be clear, i'm speaking here as a user, this has no code level changes. i've made source changes for getting more info about a particular video, but not for setting up a feed. my fork is here: https://github.com/S1D1T1/NetNewsWire
curl -s https://www.youtube.com/@hankschannel
dumps the full html of the channel page. too large to attach. but in that html I see the actual feed url:
<link rel="alternate" type="application/rss+xml" title="RSS" href="https://www.youtube.com/feeds/videos.xml?channel_id=UCOT2iLov0V7Re7ku_3UBtcQ">
maybe it's a regional thing? youtube does behave differently in different regions. if you have a vpn, try changing region. I'm in the US.