AgiMaulana / Instagram-Comments-Scraper

Instagram comment scraper using python and selenium. Save the comments into excel.
MIT License
137 stars 44 forks source link

Getting stuck at Instagram login screen #6

Open Aelfriclake opened 4 years ago

Aelfriclake commented 4 years ago

I am getting stuck at login screen and the documentation doesn't really help at this point.

ghost commented 4 years ago

@Aelfriclake the python script in this project doesn't seem to contain any code for authentication you could use this code prefixed to the top of the existing code.


driver.get('https://www.instagram.com/')

username_input = driver.find_element_by_css_selector("input[name='username']")
password_input = driver.find_element_by_css_selector("input[name='password']")

username_input.send_keys("") # Enter Username Here
password_input.send_keys("") # Enter Password Here

login_button = driver.find_element_by_xpath("//button[@type='submit']")
login_button.click()

sleep(3)

save_button = driver.find_element_by_xpath("//button[normalize-space()='Save Info']")
save_button.click()

sleep(3)

notifications_button = driver.find_element_by_xpath("//button[normalize-space()='Not Now']")
notifications_button.click()

sleep(2)
AgiMaulana commented 3 years ago

Thanks, @Pow377, could you create a PR for the login feature?

AgiMaulana commented 3 years ago

I am also trying to add a login feature but need volunteer developer to try the feature since I couldn't found free VPN service for Linux/Ubuntu, you can check the feature is under development in this branch