Horje
auto instagram login Code Example
auto instagram login
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep

class InstagramBot:
    def __init__(self, username, password):
        self.username = username
        self.password = password
        self.driver = webdriver.Chrome('C:\Program Files (x86)\chromedriver.exe')

    def CloseBrowser(self):
        self.driver.close

    def Login(self):
        driver = self.driver
        driver.get('https://instagram.com/')
        sleep(1)
        username_input = driver.find_element_by_xpath('//input[@name="username"]')
        username_input.send_keys(self.username)
        sleep(2)
        password_input = driver.find_element_by_xpath('//input[@name="password"]')
        password_input.send_keys(self.password)
        sleep(1)
        button = driver.find_element_by_xpath('//button[@type="submit"]')
        button.click()


bot1 = InstagramBot()      
bot1.Login()
        
Source: pastep.com




Python

Related
Compute the variance of this RDD’s elements Code Example Compute the variance of this RDD’s elements Code Example
python django creating products Code Example python django creating products Code Example
python check if attribute exists in dictionary Code Example python check if attribute exists in dictionary Code Example
qt line edit set text python Code Example qt line edit set text python Code Example
comtypes python Code Example comtypes python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7