Getting pages and comments from Blogger blog using RSS feeds and related issues in blog books context
I was not able to get this information easily when I searched for it. So I thought I should put up a short post on it for my own needs which perhaps may be useful for others too.
Explored RSS feed for pages and comments and found that for blogger, the following works:
That solves the issue about adding pages content to Google Apps Script (GAS) projects covered in recent posts as one can use roughly the same procedure used to get posts content with only the fetch request url being changed to get pages.
But for comments, the issue is that, in RSS as in XML backup/export file, the comments are listed separately and while they mention the associated post link (url), the post data itself is not provided. A blog book should have comments appearing after the content of the post in which the comments are made, which is how they appear on the blog itself.
So in my recent posts about GAS projects using RSS feed in json to create blog books, if a person needs to add comments immediately after the post is output, then he/she would need something like a dictionary object holding all comments for a post (built as part of preparation for main blog book creation), and then as the post is output, check the dictionary object for whether the post has comments, and if so, output it.
Note that, as of now, I think that Visual Basic for Applications (VBA) solutions using Blogger blog backup/export XML file as input (instead of RSS feed), described in recent posts of mine, may meet my current needs. So I may not do any further GAS work for this task. If in future, the VBA solution becomes inoperative for some reason and I think I should move the code to GAS, then I may invest time in porting the VBA code to GAS.
Comments
Post a Comment