0

I was trying to implement a simple bot in python which increases Instagram followers. This is what I was trying-> https://towardsdatascience.com/increase-your-instagram-followers-with-a-simple-python-bot-fde048dce20d During the process, I installed chromedriver as specified in the above-mentioned post and included the path of it in the webdriver.chrome but I am getting an error stating "WebDriverException: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home"

I tried everything which was mentioned in this StackOverflow post ->Error message: "'chromedriver' executable needs to be available in the path" but to no avail. Kindly find my code below and help me sort this error. Thanks in advance

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)
SSV
  • 149
  • 2
  • 12
  • 1
    Just add the directory where chromedriver is to the `path` or provide the binary location directly, i.e.: `chrome(path)` – Pedro Lobito Dec 06 '18 at 15:13
  • @PedroLobito Thanks for the reply. I tried that too but didn't help. I got the same error. – SSV Dec 06 '18 at 15:14
  • just drop the chromedriver in your python folder, that should be in the path – SuperStew Dec 06 '18 at 15:29
  • @SuperStew Thanks for the reply. I tried but I am getting another new error. raise exception_class(message, screen, stacktrace) SessionNotCreatedException: session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData": {"frameId":"F113CD1D503243A67C09C6D098C1B2BE","isDefault":true,"type":"default"},"id":1,"name":"","origin":"://"} (Session info: chrome=70.0.3538.110) (Driver info: chromedriver=2.15.322448 (52179c1b310fec1797c81ea9a20326839860b7d3),platform=Windows NT 10.0 x86_64)" – SSV Dec 06 '18 at 16:06
  • 1
    `webdriver = webdriver.Chrome(executable_path = "c:\\path\\chromedriver.exe")` should do it. – Pedro Lobito Dec 06 '18 at 16:26
  • @PedroLobito, Thank you, I tried as you mentioned but I am getting the following error- SessionNotCreatedException: session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"28EEEF5294EC948DE015920FEBCFFA5A","isDefault":true,"type":"default"},"id":1,"name":"","origin":"://"} (Session info: chrome=70.0.3538.110) (Driver info: chromedriver=2.15.322448 (52179c1b310fec1797c81ea9a20326839860b7d3),platform=Windows NT 10.0 x86_64) – SSV Dec 06 '18 at 16:39
  • 1
    Get the latest driver : https://sites.google.com/a/chromium.org/chromedriver/downloads – Pedro Lobito Dec 06 '18 at 16:41
  • @PedroLobito, It worked! Thank you so much – SSV Dec 06 '18 at 16:45

0 Answers0