Ruby
Sinatra
Capybara
Nokogiri
scraping

CapybaraでスクレイピングしてきたのをNokogiriに渡す。

More than 1 year has passed since last update.
main.rb
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, {:js_errors => false, :timeout => 100 })
end
session = Capybara::Session.new(:poltergeist)
session.visit URI.escape("URL")

page = Nokogiri::HTML.parse(session.html)