简单抓取一个页面

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

require ‘open-uri’
require ‘iconv’
ic = Iconv.new(“UTF8”,”GB2312”)
yang = open(“http://www.baidu.com”)
data = ic.iconv(yang.read)
puts data