class Ferrexi

Attributes

to_doc[R]

Public Class Methods

new(url, debug: false) click to toggle source
# File lib/ferrexi.rb, line 13
def initialize(url, debug: false)
  
  browser = Ferrum::Browser.new
  browser.goto(url)
  
  # without the following statement the DOM probably won't have loaded yet.
  # As a result, falls back to returning the original document source
  
  browser.network.wait_for_idle 
  
  @to_doc = Rexle.new(browser.body, debug: debug)
  
end