I have successfully setup a python webscraping script on my machine. I would like the script to be able to be triggered from another machine and still run. As it stands I am able to trigger the script when logged into the machine and it functions as expected, however when I trigger the script from another machine through command line, the script fails, does not even generate a geckodriver log. I am trying to avoid using the remote java server if possible.
from splinter import Browser
import time
browser = Browser('firefox', profile=r'C:\Users\user\AppData\Roaming\Mozilla\Firefox\Profiles\0r9gezm5.default')
browser.find_by_id('login-link').click()
browser.fill('os_username', 'user')
browser.fill('os_password', 'pass')
browser.find_by_name('login').click()
with open ("C:\Webscraping\Download List\Contacts.txt") as sheet:
for website in sheet:
browser.visit(website)
browser.find_by_id('action-menu-link').click()
browser.find_by_id('action-export-pdf-link').click()
Traceback (most recent call last):
File "\\host\c$\Webscraping\Scripts\Contacts.py", line 6, in <module>
browser = Browser('firefox', profile=r'C:\Users\user\AppData\Roaming\Mozilla\Firefox\Profiles\0r9gezm5.default')
File "C:\Anaconda2\lib\site-packages\splinter\browser.py", line 63, in Browser
return driver(*args, **kwargs)
File "C:\Anaconda2\lib\site-packages\splinter\driver\webdriver\firefox.py", line 57, in __init__
timeout=timeout, **kwargs)
File "C:\Anaconda2\lib\site-packages\selenium\webdriver\firefox\webdriver.py",
line 158, in __init__
keep_alive=True)
File "C:\Anaconda2\lib\site-packages\selenium\webdriver\remote\webdriver.py",
line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Anaconda2\lib\site-packages\selenium\webdriver\remote\webdriver.py",
line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Anaconda2\lib\site-packages\selenium\webdriver\remote\webdriver.py",
line 312, in execute
self.error_handler.check_response(response)
File "C:\Anaconda2\lib\site-packages\selenium\webdriver\remote\errorhandler.py
", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: connection reset
cmd exited on ch0pwts01 with error code 1.