Created
September 4, 2018 21:13
-
-
Save mottet-dev/e63ab6acf816c00461158d7d28b05cb4 to your computer and use it in GitHub Desktop.
InstagramBot - followWithUsername
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
def followWithUsername(self, username): | |
self.browser.get('https://www.instagram.com/' + username + '/') | |
time.sleep(2) | |
followButton = self.browser.find_element_by_css_selector('button') | |
if (followButton.text != 'Following'): | |
followButton.click() | |
time.sleep(2) | |
else: | |
print("You are already following this user") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment