Probably a newbie question on nodejs/jsdom
I am trying to scrape a website using node.js. I am using jsdom and jquery to get the html and parse the required things. But, somehow the values i am getting are not the ones shown on the website.
Basically the values are dynamically changed by javascript and i want those values. The whole reason i was using nodejs/jsdom for scraping was that js would be executed and I get the values after that event.
Is there some way to tell jsdom to wait until the javascript executes? or have i got this all wrong? I have googled a lot on this matter.
You would be better of using something like casperjs http://casperjs.org/. It is a testing utility based on phantomjs. It is basically exactly like opening the page in a webkit browser, just without the GUI. You could write something like. I dont think it works with node, but it should be easy enough to run a casper script and pipe the output back to node.: