问题一:MAC 使用splinter error
Traceback (most recent call last): from splinter.browser import Browser b = Browser(driver_name="chrome") File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/splinter/browser.py", line 63, in Browser return driver(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/splinter/driver/webdriver/chrome.py", line 28, in __init__ self.driver = Chrome(chrome_options=options, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 61, in __init__ self.service.start() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/chrome/service.py", line 73, in start os.path.basename(self.path), docs_msg) selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
解决办法:
按照其他人的建议:brew install chromedriver 行不通。下载链接已失效。
自己下载zip文件 地址:http://chromedriver.storage.googleapis.com/index.html
接着
$unzip chromedriver_map32.zip $mv chromedriver /usr/local/bin $cd /usr/local/bin $chmod a+x chromedirver
完事!