简单抓取一个页面 2015/10/10 15581 require ‘open-uri’ require ‘iconv’ ic = Iconv.new(“UTF8”,”GB2312”) yang = open(“http://www.baidu.com”) data = ic.iconv(yang.read) puts data