Back to front pageView on Hacker News (opens in a new tab)Show HN: Nightmare – Simple browser automation (opens in a new tab)nightmarejs.org429 pointsby pkrein (on Hacker News)12 years agonightmarejs.org (opens in a new tab)Registered & Protected by MarkmonitorComments (70) 33 threadsEarlier comments[-]dutzi_12 years ago1 reply#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();pkrein12 years ago#extracting stuff seems to be a common use case so added an example to the readme for ya: https://github.com/segmentio/nightmare#examplesandrey-p12 years ago#And, if you want a very very thin wrapper around Phantom (essentially a phantom script manager), feel free to have a look at this instead:https://github.com/andrey-p/ectoplasm-jsPardon the shameless plug.[-]wearhere12 years ago1 reply#What is the project's background image (http://www.nightmarejs.org/nightmarejs.org/images/ground.jpg)?[-]AnkhMorporkian12 years ago1 reply#That's a photo that Frank Hurley took on his (nearly doomed) antarctic adventure with Ernest Shackleton. You can find scads more photos here: http://www.kodak.com/US/en/corp/features/endurance/[-]wearhere12 years ago1 reply#Wow, thanks for the info! What an amazing story, and photos.AnkhMorporkian12 years ago#It really is. Hurley is one of my favorite photographers of all time; his stuff just captured the essence of the time so well![-]SnowProblem12 years ago1 reply#As someone entirely unfamiliar with both Nightmare and PhantomJS, what is the typical use case? It isn't obvious to me from the examples or FAQs. Why prefer these over something like Selenium?elwell12 years ago#I assume because it's more light-weight and hence suited better for certain needs.Load more commentsAll comments shown.Couldn't load more comments. Check your connection and try again.
Show HN: Nightmare – Simple browser automation (opens in a new tab)nightmarejs.org429 pointsby pkrein (on Hacker News)12 years ago
dutzi_12 years ago1 reply#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();
pkrein12 years ago#extracting stuff seems to be a common use case so added an example to the readme for ya: https://github.com/segmentio/nightmare#examples
andrey-p12 years ago#And, if you want a very very thin wrapper around Phantom (essentially a phantom script manager), feel free to have a look at this instead:https://github.com/andrey-p/ectoplasm-jsPardon the shameless plug.
wearhere12 years ago1 reply#What is the project's background image (http://www.nightmarejs.org/nightmarejs.org/images/ground.jpg)?
AnkhMorporkian12 years ago1 reply#That's a photo that Frank Hurley took on his (nearly doomed) antarctic adventure with Ernest Shackleton. You can find scads more photos here: http://www.kodak.com/US/en/corp/features/endurance/
AnkhMorporkian12 years ago#It really is. Hurley is one of my favorite photographers of all time; his stuff just captured the essence of the time so well!
SnowProblem12 years ago1 reply#As someone entirely unfamiliar with both Nightmare and PhantomJS, what is the typical use case? It isn't obvious to me from the examples or FAQs. Why prefer these over something like Selenium?
elwell12 years ago#I assume because it's more light-weight and hence suited better for certain needs.
Comments (70) 33 threads
Earlier commentsCan you please provide an example for using `evaluate()` to get the page's content?
I tried this, but didn't get anything:
https://github.com/andrey-p/ectoplasm-js
Pardon the shameless plug.
All comments shown.
Couldn't load more comments. Check your connection and try again.