# Scraping

**URL:** <https://metaruby.com/t/scraping/389>\
**Category:** General Programming\
**Created:** [November 18, 2015, 8:45pm UTC](https://metaruby.com/t/scraping/389 "2015-11-18T20:45:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![veverkap](https://metaruby.com/user_avatar/metaruby.com/veverkap/32/858_2.png) [@veverkap](https://metaruby.com/u/veverkap)\
**Post date:** [November 18, 2015, 8:45pm UTC](https://metaruby.com/t/scraping/389/1 "2015-11-18T20:45:07Z")

</div>

Does anyone have a suggestion on ways to grab the actual rendered page programmatically? So, we have an internal page that loads text and assets via javascript and renders out into the DOM. I want to grab the rendered DOM, not the HTML source of the page.

---

<div class="post-metadata">

**Author:** ![Ohm](https://metaruby.com/user_avatar/metaruby.com/ohm/32/828_2.png) [@Ohm](https://metaruby.com/u/Ohm)\
**Post date:** [November 19, 2015, 9:27am UTC](https://metaruby.com/t/scraping/389/2 "2015-11-19T09:27:09Z")

</div>

If you want the final page after Javascript have run, I reckon you can do so with [Capybara](https://github.com/jnicklas/capybara) and [Poltergeist](https://github.com/teampoltergeist/poltergeist), however I have only done this for request specs.

---

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [November 19, 2015, 3:38pm UTC](https://metaruby.com/t/scraping/389/3 "2015-11-19T15:38:38Z")

</div>

[Watir](http://watir.com/) will programmatically run your web browser and your browser will render everything. You can then access the DOM rendered in the browser in Ruby.
