I have a web scraper which uses the the nightmare browser automation library. Everytime I would run my nodejs app it opens up a browser window and loads the page I am trying to scrape. But I want to run it completely in the console without any windows popping up.
Asked
Active
Viewed 448 times
2 Answers
1
I would say "don't". Use Cheerio instead, it's built for headless HTML scraping

Paul
- 35,689
- 11
- 93
- 122
-
can it simulate a browser instance? – Bodhisattya Dutta Apr 17 '17 at 16:16
1
The closest you are going to get is just keeping the window hidden. To do this, instantiate your Nightmare as such:
var nm = new Nightmare({show: false})

Cameron
- 58
- 7