开发者

api to importing blog posts from wordpress, blogger

开发者 https://www.devze.com 2023-01-17 15:09 出处:网络
Hi i am using Ruby on rails. I am developing application where users can import their blogposts from wordpress , blogger and may be typepad into my site. can any one guide me how can i do it. Even if

Hi i am using Ruby on rails. I am developing application where users can import their blogposts from wordpress , blogger and may be typepad into my site. can any one guide me how can i do it. Even if it's not a ROR solution do give me some ideas. I tried using Gdata api for blogger but that just 开发者_如何学Gogave me the link to post.


I don't know of an API that will do all of that (there maybe one though), but couldn't you just get a user's posts from their RSS feed? Since wordpress, blogger and pretty much all other "blogging" sites have an RSS feed, that should make it pretty easy to import posts because the data is just XML. You might have to parse each feed differently because blogger and wordpress probably render slightly different XML tags.

The only problem I can think of is that if a user's RSS feed has some kind of excerpt mode enabled. If so, you would have to tell them to disable that.

A nice XML parser for RoR is Nokogiri. I've used it before and thought it was pretty easy to setup and use. Here's a link to some tuts on Nokogiri: http://nokogiri.org/tutorials

0

精彩评论

暂无评论...
验证码 换一张
取 消