Me salta un error de identacion from selenium import webdriver from selenium.webdriver.common.keys import Keys import time
class TwitterBot: def init(self,username, password): self.username=username self.password = password self.bot=webdriver.Firefox()
def login(self):
bot=self.bot
bot.get("https://twitter.com")
time.sleep(3)
email=bot.find_element_by_class_name("email-input")
password=bot.find_element_by_name("session[password]")
email.clear()
password.clear()
email.send_keys(self.username)
password.send_keys(self.password)
Alex = TwitterBot("[email protected]", "xxxxxx") Alex.login()