Parse RSS feeds with Lua

note, May 23, 2023 on Mitja Felicijan's blog

Example of parsing RSS feeds with Lua. Before running the script install:

  • feedparser with luarocks install feedparser
  • luasocket with luarocks install luasocket
local http = require("socket.http")
 local feedparser = require("feedparser")
 
-local feed_url = "https://mitjafelicijan.com/feed.rss"
+local feed_url = "https://mitjafelicijan.com/index.xml"
 
 local response, status, _ = http.request(feed_url)
 if status == 200 then
-- 
cgit v1.2.3