我拷贝了 wombat 官网的例子:
require 'wombat'
Wombat.crawl do
base_url "http://www.github.com"
path "/"
headline xpath: "//h1"
subheading css: "p.subheading"
what_is({ css: ".teaser h3" }, :list)
links do
explore xpath: '//*[@class="wrapper"]/div[1]/div[1]/div[2]/ul/li[1]/a' do |e|
e.gsub(/Explore/, "Love")
end
search css: '.search'
features css: '.features'
blog css: '.blog'
end
end
官网的预期结果是:
可是我在终端运行后,什么都没有显示,也没找到新生成里文件神马的。。求解惑,要怎么样才能看到 wombat 运行的结果呢?