Instagramlogin Error (Selenium) - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: Instagramlogin Error (Selenium) (/thread-15663.html) |
Instagramlogin Error (Selenium) - julian_veit - Jan-26-2019 I tried to make a python program that can (should) login into Instagram. Here's the code: from selenium import webdriver from selenium.webdriver.common.keys import Keys import time # Login Data Example001: #[email protected] #[email protected] #subbot001ccom #[email protected] class InstagramBot: def __init__(self, username, password): self.username = username self.password = password self.driver = webdriver.Firefox() def closeBrowser(self): self.driver.close() def login(self): driver = self.driver driver.get("https://www.instagram.com/") time.sleep(2) login_button = driver.find_element_by_xpath("//a[@href='/accounts/login/']") login_button.click() time.sleep(2) user_name_elem = driver.find_element_by_xpath("//input[@name='username']") user_name_elem.clear() user_name_elem.send_keys(self.username) password_elem = driver.find_element_by_xpath("//input[@name='password']") password_elem.clear() password_elem.send_keys(self.password) password_elem.send_keys(Keys.RETURN) example001 = InstagramBot("[email protected]", "[email protected]") example001.login()When i try to run it, it manages to open the front page of Instagram, but it produces the following error: I recently tried to login into Instagram, with an test account using Pycharm and then that Error occured. I tried to fix it, but it still doesn't work like it should. The program is able to open the Instagram front page, but there it stops and that error occours. I followed this youtube Tutorial to make this: https://www.youtube.com/watch?v=BGU2X5lrz9M
|