-2

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.

2 Answers2

1

I would say "don't". Use Cheerio instead, it's built for headless HTML scraping

Paul
  • 35,689
  • 11
  • 93
  • 122
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