This is a simple Google Apps Script for read a atom RSS file type.
This not work with any rss file type , just with this type:
1 | xmlns:atom="http://www.w3.org/2005/Atom" |
This is the script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | function RSSRead() { var sheet = SpreadsheetApp.getActiveSheet(); var item, date, title, link, desc; var txt = UrlFetchApp.fetch("http://free-tutorials.org/feed/").getContentText(); var document = XmlService.parse(txt); var root = document.getRootElement(); var entries = root.getChildren('channel'); Logger.log(entries); for (var i = 0; i < entries.length; i++) { var link = entries[i].getValue(); for (var j = 0; j < link.length; j++) { var link = entries[j].getValue(); Logger.log(link); } } |