Geolocation-enabled headless browsers: Do they exist?

Hey everyone,

I’m trying to find a headless browser that can handle geolocation. Does anyone know if such a thing exists?

I’ve already checked out Phantomjs, but it doesn’t seem to have this feature. I’m really curious about how other programs like prey project and lockit tight manage to use geolocation.

What I’m specifically interested in is client-side geolocation that uses WiFi positioning and triangulation. Is there a way to achieve this with headless browsers?

If anyone has experience with this or knows of any alternatives, I’d really appreciate your input. Thanks in advance for any help or suggestions you can offer!

hey aroberts, have u checked out puppeteer? it’s a node library that can control headless chrome. i think it supports geolocation api calls. might be worth lookin into for ur project. Not sure bout WiFi triangulation tho, that’s pretty advanced stuff. maybe combine it with a separate geoIP service?

I’ve actually tackled a similar challenge recently. While headless browsers with built-in geolocation are rare, I found success using Playwright. It’s a relatively new tool that supports multiple browser engines and has decent geolocation emulation capabilities.

For WiFi positioning and triangulation, you might need to look beyond just browser solutions. I ended up integrating a third-party geolocation API that specializes in this type of positioning. It wasn’t straightforward, but combining Playwright with this external service gave me the accuracy I needed.

One caveat: make sure you’re complying with privacy regulations when implementing geolocation features. It’s a sensitive area, and you don’t want to run afoul of any laws.

Have you considered using a hybrid approach? Maybe a headless browser for most tasks, but a full browser instance specifically for geolocation? It’s not ideal, but it could be a workable compromise if you can’t find a perfect all-in-one solution.

I’ve been down this road before, and it’s a tricky one. While most headless browsers don’t natively support geolocation, there are workarounds. Have you considered using Selenium with a headless Chrome or Firefox? They can emulate geolocation with some configuration.

For WiFi positioning and triangulation, you might need to look beyond just browsers. Consider integrating with external geolocation APIs or services that specialize in this kind of positioning. They can provide more accurate results than browser-based solutions.

One approach I’ve used is to combine a headless browser with a separate geolocation service. This way, you can get the best of both worlds - the automation capabilities of a headless browser and the advanced geolocation features you need.

It’s not a straightforward solution, but it can be quite effective once set up properly.