lib/maxwell/converter.rb in maxwell-0.3.0 vs lib/maxwell/converter.rb in maxwell-0.4.0
- old
+ new
@@ -36,10 +36,12 @@
Capybara.default_selector = :xpath
session = Capybara::Session.new(:poltergeist)
session.driver.headers = { 'User-Agent' => @user_agent }
session.visit url
- Nokogiri::HTML(session.html)
+ Nokogiri::HTML(session.html).tap do
+ session.driver.quit
+ end
end
end
end
end