SHARE
TWEET

Test code

a guest Jan 25th, 2019 172 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from selenium import webdriver
  2. from selenium.webdriver.common.keys import Keys
  3. import time
  4.  
  5.  
  6. class InstagramBot:
  7.  
  8.     def __init__(self, username, password):
  9.         self.username = username
  10.         self.password = password
  11.         self.driver = webdriver.Firefox()
  12.  
  13.     def closebrowser(self):
  14.         self.driver.close()
  15.  
  16.     def login(self):
  17.         driver = self.driver
  18.         driver.get("https://www.instagram.com/")
  19.         time.sleep(5)
  20.  
  21.  
  22.         # "//a[@href'accounts/login']"
  23.         # "//input[@name='username']"
  24.         # "//input[@name='password']"
  25.  
  26.  
  27. coreyIG = InstagramBot("username", "password1234")
  28. coreyIG.login()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top