袋熊 带有优雅DSL的Web抓取工具,可解析来自网页的结构化数据。 用法: gem install wombat 抓取页面: 使用Wombat的最简单方法是调用Wombat.crawl并将其传递给一个块: require 'wombat' Wombat . crawl do base_url "https://www.github.com" path "/" headline xpath : "//h1" subheading css : "p.alt-lead" what_is ( { css : ".one-fourth h4" } , :list ) l