Module: RoRoSupport::Crawler

Defined in:
lib/roro_support/crawler.rb

Instance Method Summary collapse

Instance Method Details

#crawler(options = {visible: false}) ⇒ Object



3
4
5
6
# File 'lib/roro_support/crawler.rb', line 3

def crawler(options={visible: false})
  Headless.new.start if options[:visible] == false
  ::Watir::Browser.new :chrome
end

#get_html_from(path, options = {}) ⇒ Object



8
9
10
11
12
# File 'lib/roro_support/crawler.rb', line 8

def get_html_from(path, options = {})
  b = crawler
  b.goto path
  Format.utf8 b.html
end