Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How could i grab a website and execute js on this site to get the complete dom?
3 points by addisaden on May 30, 2012 | hide | past | favorite | 3 comments
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



Selenium is capable of doing this and has a Ruby driver (library from which it can be controller).

http://selenium-client.rubyforge.org/


You can do this with Node+jsdom or PhantomJS.


Thank you. PhantomJS looks great.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: