使用 InstaPy 出现 "selenium.common.exceptions.SessionNotCreatedExceptionSelenium" 错误

getting "selenium.common.exceptions.SessionNotCreatedExceptionSelenium" error using InstaPy

[设置: Windows 10 x64 PyCharm2019.3.3(社区版)]

我正在尝试使用 InstaPy 创建一个简单的 Insta 机器人,但我一直 运行 陷入同样的​​错误

代码:

from instapy import InstaPy

InstaPy(username='username', password='password').login()

我不断收到以下错误:

Traceback (most recent call last):
  File "C:/Users/Niku/PycharmProjects/InstaBot/InstaBot.py", line 6, in <module>
    InstaPy(username='Rubixmusicprod', password='Niku2020').login()
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\instapy\instapy.py", line 309, in __init__
    self.browser, err_msg = set_selenium_local_session(
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\instapy\browser.py", line 111, in set_selenium_local_session
    browser = webdriver.Firefox(
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

我已经尝试升级 selenium 以及 Geckodriver 和相关驱动程序。 安装 InstaPy 是一项使命! 我可能只需要在这里使用浏览器自动化方式。

任何帮助将不胜感激!!

您必须在 Firefox 中将 Selenium 与 Geckodrive 一起使用

session = InstaPy(username=INSTAGRAM_LOGIN,
                  password=INSTAGRAM_PASSWORD,
                  geckodriver_path='geckodriver.exe')