Here is a quick tip for anyone sick of working with the xml in RSS feeds. You can use the
Google Feed API in your scripts to automatically convert the XML in the RSS feed to JSON which makes working with them much easier. For example, there is an
RSS Feed from the
Consumer Product Safety Commission and it has all the government recalls in the United States. Using this simple trick, you could easily pull the fresh feed on a regular basis and parse out information about recalls to use in your account. You can also configure Google Alerts to generate RSS feeds based on specific keywords you are interested in. For example, here is an
RSS feed for the keyword "smx".
Thanks,
Russ
/******************************************
* Use Google Feed API to convert RSS to json
* Version 1.0
* Created By: Russ Savage
* FreeAdWordsScripts.com
******************************************/
// Usage: var jsonData = convertRssToJson('http://www.cpsc.gov/en/Newsroom/CPSC-RSS-Feed/Recalls-RSS/');
function convertRssToJson(rssUrl) {
var FEED_API_URL = "https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q="
var url = FEED_API_URL+encodeURIComponent(rssUrl);
var resp = UrlFetchApp.fetch(url);
if(resp.getResponseCode() == 200) {
return JSON.parse(resp.getContentText());
} else {
throw "An error occured while trying to parse: "+rssUrl;
}
}
ReplyDeleteyour explanation way is too good, very easy to understand for all readers. Thank you for providing the best details and I want more unique posts.
Primavera Training in Chennai
Primavera Course in Chennai
Tableau Training in Chennai
Spark Training in Chennai
Power BI Training in Chennai
Excel Training in Chennai
Oracle Training in Chennai
Oracle DBA Training in Chennai
Social Media Marketing Courses in Chennai
I have read your blog its very attractive and impressive. I like it your blog.
ReplyDeleteTechnology
businessexceltemplates
If you want to improve your writing skill I recommend you to visit this site!
ReplyDeleteI am hoping the same best effort from you in the future as well. In fact your creative writing skills has inspired me. buy Google reviews
ReplyDeleteVery informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. convert money
ReplyDeleteWhen you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style. Buy Pinterest Followers
ReplyDeletebuenos dias mi amor Very informative information on your site here. I like this post because we can get some useful information from your blog. I expect more post from you
ReplyDeletebuenos dias mi amor Very informative information on your site here. I like this post because we can get some useful information from your blog. I expect more post from you
ReplyDelete