4 ms·
Nice work! Can you please provide an example for using `evaluate()` to get the page's content? I tried this, but didn't get anything: new Nightmare() .
by dutzi_ 12y ago
Nice work!
Can you please provide an example for using `evaluate()` to get the page's content?
I tried this, but didn't get anything:
new Nightmare()
.goto('http://yahoo.com')
.evaluate(function (page) { return this.content; }, function (res) {console.log(res);})
.run();
- pkrein 12y agoextracting stuff seems to be a common use case so added an example to the readme for ya: https://github.com/segmentio/nightmare#examples https://github.com/segmentio/nightmare#examples