Hpricot 直接解析某 URL 对应的 HTML 2015/11/15 39878 清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>> require 'rubygems' require 'hpricot' require 'open-uri' doc = Hpricot(open('http://www.rubyinside.com/test.html')) puts doc.search("h1").first.inner_html