Feed Tools 示例代码

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

1
2
3
4
5
6
7
8
9
10
11
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"