Skip to content

Instantly share code, notes, and snippets.

@fnneves
Last active January 24, 2023 13:22
Show Gist options
  • Save fnneves/bb570f77c9471d0b39becaf610332247 to your computer and use it in GitHub Desktop.
Save fnneves/bb570f77c9471d0b39becaf610332247 to your computer and use it in GitHub Desktop.
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
@eyal9
Copy link

eyal9 commented May 31, 2021

Hello! This is very cool. Have you ever tried to create an instagram report bot? Will you try to make one?

@khalsajijbd-prog-craet
Copy link

not working

@Nerone1967
Copy link

broken?

@its-codingz
Copy link

Not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment