Running scraped javascript with cheerio

I have a webpage that has some JS APIs that do not change dom but return some numbers. I would like to write a NodeJS application that loads such pages and performs these functions in the context of the loaded page.

I looked at cheerio for cleaning pages ... but while I see how easy it is to navigate and manipulate the DOM with it, I see no access to launching page functions. Can this be done?

Should I look instead of jsdom?

thank

+5
source share
2 answers

It sounds like you want to use PhantomJS, which will provide fully visualized output, and then use cheerio.

+2
source

Cheerio jsdom - HTML JavaScript. API, , JavaScript, node. , , / JavaScript . , http://phantomjs.org/. Node , .

+1

All Articles