Quick start guide
Initial state
- You have non full-text (“partial”) RSS feed of your favorite site (not a must, but desirable);
- You want to create full-text feed based on “partial” feed or on a “regular” site (without RSS feed);
- You have Windows based PC (.NET Framework 3.5).
Hello web!
Let’s create full-text RSS feed for some website. For example we will create full-text feed for engadget.com using feed http://www.engadget.com/rss.xml.
Step 1. Running DevTools
Using Internet Explorer 6 (or higher) or Firefox, follow this link - http://rss-farm.ru/devtools_latest.zip. “DevTools” application has to start in a few seconds after you confirm launching. Try to install Microsoft .NET framework 3.5 and re-launch the application if you get any errors.
Step 2. Exploring web page – “Parser” tab
In DevTools go to the “Parser” tab. You can explore a structure of any web-page using this tab. Here you have to find out where the content of your RSS feed is on each page.
In “URL” filed enter the URL of any post from “partial” RSS feed (any post’s URL from http://www.engadget.com/rss.xml in our example). In “Use encoding” field enter right encoding and mark checkbox if encoding isn’t UTF-8 (In this example encoding is UTF-8, so you don’t have to do anything about encoding). When URL and encoding fields are set press “Refresh” button. Next, on the right side there is a document node “#document”. Expand it and explore its child. Depends on active node, on the left side you will see different parts of the original web-page. Use “Browser” tab to review these parts, “HTML source” – to review its source and “Properties” tab to review major properties.
Now it’s important to determine where feed’s content is on the page. You can do it with “Parser” tab by clicking documents nodes on the right site and review the content on the left.
When you reach the content (on the left site you will see only topic text), you have to stop. Now go to the “Properties” tab and see in what HTML-element you content is. In our example there is a DIV-node with class “post”.
Step 3. Coding – “Template” tab
So, now you know where your content is on the page. Let’s write a template to create a full-text RSS channel.
Go to the “Template” tab and fill all fields. Also check “RSS based” checkbox (we are creating template based on “partial” RSS feed, right?). Press “Update” button and look what happens. On the right site there will be the headers of the original feed.
Now we have to write some code to determine the content of our feed. Type in “Article” field such code:
var d = new Document(article.url, channel.encoding);
var el = d.getElementsByAttr("div", "class" , "post")[0];
article.body = el.innerHTML;
Review this code. In the first line we created new Document to get a web-page with a content of a current feed item. In the second line we selected first HTML DIV-node with class “post”, which contains the content of the current feed item. Finally in the last line we copied the content to the article in our feed.
Hint! You can find more ways of getting the content from the web-page in the documentation.
Press “Update” button. Full-text feed is almost done. Now we have to save the template and load it to the internet service.
Step 4. Creating a feed.
Using web-site create a new channel based on the template:
1. Go to "My channels" page, "Create new channel" section in the bottom of the page.
2. Enter alias of the new channel and pick-up XML-file in "Template of the channel" filed. Press "OK".
3. That's it! Now you are at new channel's page (http://rss-farm.com/my/channels/{channel's alias}). You can copy channel's URL and add it to your RSS-reader. Note than channel will be empty at this time - articles will appear soon, you just have to wait some time.
All done!
Conclusion
As you see it’s rather easy – creating full-text RSS feeds. You just have to explore original page and write some code.