I'm using the go selenium package: https://github.com/tebeka/selenium
and using the phantomjs browser:
caps := selenium.Capabilities{
"browserName": "phantomjs",
}
wd, err := selenium.NewRemote(caps, "")
if err != nil {
log.Fatal(err)
}
I'm trying to also send along some phantomjs settings so I can set the user-agent string. I'm trying to make a crawler and certain websites won't load with a headless browser user-agent. I know this can be done with python and other languages but I haven't seen any examples in go.