View recent posts | Search forum topics
Is there a good tutorial or example code anywhere on the best way to read in xml or an RSS feed? I'd like to read in the feed and use it to determine the path to images to download. Thanks in advance for the help!
If all you need is to get info from a feed, maybe you could just download the feed in a table and search it after:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
-- load needed modules local http = require("socket.http") local ltn12 = require("ltn12") -- a simplified http.get function function http.get(u) local t = {} local respt = request{ url = u, sink = ltn12.sink.table(t) } return table.concat(t), respt.headers, respt.code end http.get("http://www.yourfeed.com/feed.rss")
this info was extracted from the ltn12 documentation at: http://w3.impa.br/~diego/software/luasocket/ltn12.html. I didn't test it but it should work fine. Alex
If all you need is to get info from a feed, maybe you could just download the feed in a table and search it after:
this info was extracted from the ltn12 documentation at: http://w3.impa.br/~diego/software/luasocket/ltn12.html. I didn't test it but it should work fine.
Alex