I'm using Selenium Webdriver in Python.
While running the script in headless browser(phantomjs) I'm getting an URLError:
<urlopen error [Errno 111] Connection refused>
Any one can please help to handle this?
Having Googled this, it seems to happen unpredictably but after I've made a few requests with Selenium / Phantom. If I create a new webdriver with driver = webdriver.PhantomJS()
then I'm able to continue making requests. I suggest others use the same workaround.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With