Hacker News new | ask | show | jobs
Ask HN: Headless broswers – use cases?
2 points by qute 4139 days ago
what might be interesting use cases for headless browsers like Ghost or PhantonJS, except for running tests?
3 comments

Crawling pages is probably one of the most common use cases, I would imagine.

I use PhantomJS and SlimerJS to host CLI tools written in TypeScript/JavaScript. I also run these tools in the browser because I find it a better debugging experience than remote debugging.

There's a lot of functionality available through NPM and writing tools and scripts in TS can be very productive and easy to cobble things together - even advanced things.

I used it for logging into my bank's crappy web interface and dumping my financial data as csv. It required javascript and has no api available.

This was so I could convert the data from multiple accounts to http://www.ledger-cli.org/ format automatically.

Crawling webpages. I needed to find out if a product price is actually visible to users. PhantomJS executes JS and CSS and I can execute a Javascript query to check.