3 ms·
How could i grab a website and execute js on this site to get the complete dom?
Hi everybody,
is there a way to grab the website and execute the javascripts? Some Websites inject Content via Javascript and Ajax and it would be great to get these.
I am porgramming in Ruby. Maybe there is a way to do this with NodeJS?
Thank you for your help
- deeds 14y agoHave you looked at Capybara + Capybara-webkit? with the :js => true option set on your test cases, you might have some success. And it's still ruby, which is nice. https://github.com/jnicklas/capybara#calling-remote-servers https://github.com/jnicklas/capybara#calling-remote-servers https://github.com/thoughtbot/capybara-webkit https://github.com/thoughtbot/capybara-webkit
- wmf 14y agoYou can do this with Node+jsdom or PhantomJS.
- addisaden 14y agoThank you. PhantomJS looks great.
- mmccomb 14y agoSelenium is capable of doing this and has a Ruby driver (library from which it can be controller). http://selenium-client.rubyforge.org/ http://selenium-client.rubyforge.org/