我试图用python实现一个简单的bot,以增加Instagram粉丝。这就是我正在尝试的-> https://towardsdatascience.com/increase-your-instagram-followers-with-a-simple-python-bot-fde048dce20d 在此过程中,我按照上述文章中的说明安装了chromedriver,并将其路径包含在webdriver.chrome中,但出现错误,提示“ WebDriverException:'chromedriver.exe'可执行文件必须位于PATH中。请参阅https://sites.google.com/a/chromium.org/chromedriver/home ”
我尝试了所有StackOverflow帖子-> Error message: "'chromedriver' executable needs to be available in the path"中提到的所有内容,但无济于事。请在下面找到我的代码,并帮助我解决此错误。预先感谢
import pandas as pd
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep, strftime
from random import randint
#driver=webdriver.Chrome("C:/Users/Users/Downloads/chromedriver_win32/chromedriver.exe")chromedriver_path="C:/Users/Users/Downloads/chromedriver_win32/chromedriver.exe"
webdriver = webdriver.Chrome(executable_path = chromedriver_path)
sleep(2)
webdriver.get('https://www.instagram.com/accounts/login/?source=auth_switcher')
sleep(3)