Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- from selenium.webdriver.common.keys import Keys
- import time
- 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(5)
- # "//a[@href'accounts/login']"
- # "//input[@name='username']"
- # "//input[@name='password']"
- coreyIG = InstagramBot("username", "password1234")
- coreyIG.login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement