from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from instagramuserinfo import email, password
import time
class Instagram:
def __init__(self, email, password):
self.browser = webdriver.Chrome()
self.email = email
self.password = password
def signIn(self):
self.browser.get("https://www.instagram.com")
time.sleep(3)
emailInput = self.browser.find_element(By.XPATH, "//*[@id='loginForm']/div/div[1]/div/label/input") # burayı düzenledim
passwordInput = self.browser.find_element(By.XPATH, "//*[@id='loginForm']/div/div[2]/div/label/input") # burayı düzenledim
emailInput.send_keys(self.email)
passwordInput.send_keys(self.password)
passwordInput.send_keys(Keys.ENTER)
time.sleep(5)
instgrm = Instagram(email, password)
instgrm.signIn()