Skip to content

Instantly share code, notes, and snippets.

@mirzalazuardi
Last active May 19, 2020 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mirzalazuardi/96cbee6306b2be73bc672125c500e497 to your computer and use it in GitHub Desktop.
Save mirzalazuardi/96cbee6306b2be73bc672125c500e497 to your computer and use it in GitHub Desktop.
scrapping with watir and nokogiri (dynamic js)
browser = Watir::Browser.new(:chrome, headless: true)
browser.goto(url)
doc = browser.element(css: 'html').wait_until(&:present?)
Nokogiri::HTML(doc.inner_html).css('html’)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment