linesky 发表于 2011-04-15 00:08

Feed Tools 示例代码

require 'feed_tools'

slashdot_feed = FeedTools::Feed.open('http://www.oschina.net/code/rss')
slashdot_feed.title
=> "OSchina"
slashdot_feed.description
=> "News for nerds, stuff that matters"
slashdot_feed.link
=> "http://www.oschina.net/"
slashdot_feed.items.first.find_node("slash:hitparade/text()").to_s
=> "43,37,28,23,11,3,1"

2gua 发表于 2011-04-15 08:41

最好配上文字说明下。
页: [1]
查看完整版本: Feed Tools 示例代码