Rss reader in tiddlywiki?

Hi everyone, I want to display the latest videos uploaded by several youtube channel. Each channel has its own rss feed so I’m wondering:

Is there a way to fetch rss feed and render them inside a tiddler (single file, local tiddlywiki)?
Is that possible with javascript/is there a plugin for that ?

Hi Telumire

Flibbles xml plugin:

tw5-xml

will render an rss feed saved in a tiddler as type ‘text/xml’.

I am definitely not an expert on xml, but this template in a standard tiddler named ‘RFI’ worked for me in the past, up to a point. It does not fetch the feed. That’s another problem that somebody else might know how to solve;

<$tiddler tiddler="RFI - xml">

<$xpath for-each = "//channel/item">
<ul><li>
<$xpath value-of="title"/><br><br>
<$xpath value-of="enclosure/@url"/></li></ul>
</$xpath>


</$tiddler>

The rss feed was copy pasted into another tiddler named ‘RFI - xml’ and saved as type text/xml.

The point it stopped working was when RFI stopped offering podcasts via rss, which seems to be common now. It did not download anything but rendered the title and link to an mp3 which was enough for me at the time.

You could try it with a manually saved and pasted youtube feed to see if it works as you want and then look at how to fetch the feed. The above template will not work for youtube but it might give you some clues. Finding the magic combo of xpath values was a real pain and every feed is different so - good luck.

Best
Watt

1 Like

That’s a good starting point, thanks ! Maybe I could use this + a tool that download the rss feed each week or something … seems like the windows task scheduler could do the trick : How to Schedule Downloads with Windows Task Scheduler - Docparser.

Or maybe I could use a rss reader addon and get the feed from it somehow.

It sounds like a nice project for TW, but a lot of work. RSS suits me but its future does seem in doubt, which is a pity. Does YT still offer it? If so, you could check if the file type is xml or atom or maybe some YT specific flavour before you get going. Maybe @Flibbles can confirm whether tw-xml5 will render all flavours of rss but I think it might be xml only.
Good luck, hope you get it going.

1 Like

Yes ATM youtube still offer RSS feed, here’s the feed for Jeremy Ruston’s youtube channel :

https://www.youtube.com/feeds/videos.xml?channel_id=UC6S4giwg_OP2kBXbyjeNjiQ

Seems like it’s xml.

You can probably use RSS into Google Sheets in combination with TiddlyGoo.

I’m afraid TiddlyGoo no longer works.

1 Like

I would rather not depend on a google spreadsheet (google being notorious for dropping features) but it does seems like a good option, thanks !

After some testing it seems like some links are not working, reddit feed for example :

=ImportFeed("https://www.reddit.com/user/telumire/submitted/.rss")

This feed is valid in a rss feed reader like feedbro thought.

It’s not a big deal in this case since it does work for youtube rss feed but I thought it was worth mentioning.

I made a simple RSS feed reader in tiddlywiki a while ago, I have no idea where it is, but the important part is that I wasn’t able to make it completely in-browser because not every feed has the CORS headers set up correctly so you can’t load them from inside a wiki.

That may be why some feeds just don’t work.

And I don’t think that RSS is dying, I think that google is trying to kill it but it is useful enough that everywhere outside of google people are still using it. And apparently even google is using it with youtube, so that is something.

1 Like

One small but significant change to the landscape is that within the last couple of years GitHub enabled CORS by default for GitHub Pages, which is often used to host blogs. And of course it means that it would be possible for people to subscribe to feeds from tiddlywiki.com.

Yes I’m aware of the CORS issue, apparently it’s possible to go around it by using a proxy (since server to server communications are not restricted by that) : CORS workaround to consume RSS in a React App | by Will Carter | JavaScript in Plain English

Sadly, it’s hard to make such a proxy secure, and insecure proxies on the open internet tend to get abused quickly.

The author has shared the source code of his own proxy but yes it’s quite an involved process, I wish there was a simpler way, ideally not relying on a GAFAM/hosting a server…

reference