Last active
January 24, 2023 13:22
-
-
Save fnneves/bb570f77c9471d0b39becaf610332247 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from time import sleep, strftime | |
from random import randint | |
import pandas as pd | |
chromedriver_path = 'C:/Users/User/Downloads/chromedriver_win32/chromedriver.exe' # Change this to your own chromedriver path! | |
webdriver = webdriver.Chrome(executable_path=chromedriver_path) | |
sleep(2) | |
webdriver.get('https://www.instagram.com/accounts/login/?source=auth_switcher') | |
sleep(3) | |
username = webdriver.find_element_by_name('username') | |
username.send_keys('your_username') | |
password = webdriver.find_element_by_name('password') | |
password.send_keys('your_password') | |
button_login = webdriver.find_element_by_css_selector('#react-root > section > main > div > article > div > div:nth-child(1) > div > form > div:nth-child(3) > button') | |
button_login.click() | |
sleep(3) | |
notnow = webdriver.find_element_by_css_selector('body > div:nth-child(13) > div > div > div > div.mt3GC > button.aOOlW.HoLwm') | |
notnow.click() #comment these last 2 lines out, if you don't get a pop up asking about notifications |
broken?
Not working
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
not working