1

I downloaded the suitable version of Chrome webdriver to use for my instagram bot the thing is it work correctly for my code but when I import a function to another script I get this strange error =

" selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 80 "

but I am sure about the version !

:(

like.py :

        hs = input("Enter the hashtags (python,linux,fashion) => ")
        num = input("How many posts you want to like => ")
        username = input("Username => ")
        password = input("Password => ")
        driver = webdriver.Chrome()
        driver.get("https://instagram.com")
        sleep(0.5)
        user_name = driver.find_element_by_xpath("//input[@aria-label='Phone number, username, or email']")
        user_name.clear()
        user_name.send_keys(username)
        pass_word = driver.find_element_by_xpath("//input[@aria-label='Password']")
        pass_word.clear()
        pass_word.send_keys(password)
        driver.find_element_by_xpath("//div[contains(text() , 'Log In')]").click()

the code above is working fine and healthy but this code below when I import login() function in another script it doest'n work:


from modules import like

                like.login()
                like.hashtag_like()
                input("[!] Press enter to close the Browser ... ")
                like.quit()

reza79
  • 11
  • 1

0 Answers0