| Thejesh GN | A Blog, A Website and A container for all my views with excerpts from technology, life, travel, films, india, photography, kannada, friends and other interests. I am Thejesh GN and my friends call me Thej..more. |
![]() |
|
As you know earlier I had parsed Aamir Khan’s Blog to create a feed. It was custom screen scraping code to generate the feed.Today, after reading Anand’s blog, I did the same using YQL and Pipes. Using YQL/PIPE is much easier than writing custom code and is less buggy. The post below is for fellow hackers. I have tried to write a detailed post on the process I followed and technologies I used. select * from html where url="http://74.55.20.11/blog/login.php" and xpath="//a[contains(@href,'/blog/login.php?topicid=')]" Now that goes to home page of Aamirs blog and gets the links of all the recent posts listed on side bar. select * from html where url="http://74.55.20.11/blog/login.php?topicid=21url" and xpath="//a[contains(@href,'/blog/login.php?topicid=')]" The most beautiful thing of using Pipes is YQL is built into pipes. So I can send the result of a module into YQL and vice versa. This makes YQL and Pipes a deadly combination. To get the content I looped through the list of urls and used get page module. I am now getting the data between first You can clone the pipe that I have created to experiment with it. to do: <span class="graybold">Oct,09,2007</span> and parse them into date object. 2. Fix the bugs if there are any. Let me know if you find.
8 Comments posted on "RSS Feed for Aamir Khan’s blog using YQL and Pipes"
Prasoon on March 9th, 2009 at 8:28 PM #
Suddenly today I saw 50 new updates on the feed I had subscribed long back but it had only titles and all that changed again a little while ago I saw text below those feeds – loved it all then. Great work thej.
Thejesh GN on March 9th, 2009 at 8:35 PM #
@Prasoon : Thanks. Now you can see the latest post too :) I was under the impression aamir has a feed @ that “http://feeds2.feedburner.com/aamirkhan” and was using it for my blogroll for a while now. Now, is that one u created?
Thejesh GN on March 10th, 2009 at 5:37 PM #
@sandeep : Yup. Its created by me :) Neat! I’d been using a pure XPath solution that returns just the titles. It had the ghastly URL http://www.s-anand.net/xpath?url=http%3A%2F%2F202.87.41.148%2Fdigital%2FAamirKhan%2Flogin.php%3Ftopicid%3D1&xpath=//acontains(@href,%22login.php?topicid=%22)not(contains(@href,%22page=%22))string-length(.)%3E2%20title-%3E.%20link-%3E./@href Look forward to moving to your :-)
» links for 2009-03-11 Thej Live on March 12th, 2009 at 10:43 AM #
[...] Thejesh GN » RSS Feed for Aamir Khan’s blog using YQL and Pipes As you know earlier I had parsed Aamir Khan’s Blog to create a feed. It was custom screen scraping code to generate the feed.Today, after reading Anand’s blog, I did the same using YQL and Pipes. Using YQL/PIPE is much easier than writing custom code and is less buggy. (tags: aamirkhan) [...]
Thejesh GN » Feed for Aamir Khan’s Blog on September 23rd, 2009 at 1:53 PM #
[...] MAr 09 2009 : Updated to use YQL, Read RSS Feed for Aamir Khan’s blog using YQL and Pipes for more details. Its much better now. You don’t have to worry about subscribing again. Just [...]
Vishal on December 10th, 2009 at 11:03 PM #
Thanks. This is useful. Post a comment
|
|
||||||