嘿,大家好,我正在尝试编写一个instabot,刚刚开始,但是从一开始我就不能让它工作,每次我尝试运行我的快速入门时,它都会给我这个错误:
InstaPy Version: 0.6.10
._. ._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "C:/Users/Floris/InstaPy"
Traceback (most recent call last):
File "c:/Users/Floris/Desktop/instabot/quickstart.py", line 12, in <module>
session = InstaPy(username=insta_username,
File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\instapy\instapy.py", line 312, in __init__
self.browser, err_msg = set_selenium_local_session(
File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\instapy\browser.py", line 121, in set_selenium_local_session
browser = webdriver.Firefox(
File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in __init__
RemoteWebDriver.__init__(
File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\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我安装了InstaPy从快速入门运行安装和更新这里是我的代码
# imports
from instapy import InstaPy
from instapy import smart_run
insta_username = ''
insta_password = ''
# get an InstaPy session!
session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=False)
with smart_run(session):
# activity
session.like_by_tags(["natgeo"], amount=10)它并没有那么高级,因为我只是想让它启动
我希望你能帮助我
发布于 2020-09-29 19:05:33
如果你还没有火狐和geckodriver,你应该安装them....that,如果你已经有geckodriver,试着在InstaPy中添加geckodriver_path参数。
session = InstaPy(username="Your username", password="your password", geckodriver_path= r"C:\Users\REPLACE\REPLACE\REPLACE\geckodriver.exe")https://stackoverflow.com/questions/63914997
复制相似问题