Skip to content

Instantly share code, notes, and snippets.

@iomonad
Created December 12, 2017 16:05
Show Gist options
  • Save iomonad/285c58fa8abdfd08bffbd0a8c0fa39c9 to your computer and use it in GitHub Desktop.
Save iomonad/285c58fa8abdfd08bffbd0a8c0fa39c9 to your computer and use it in GitHub Desktop.
follow boi
from selenium import webdriver
import time
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
driver = webdriver.Firefox()
driver.get("http://github.com/login")
username = driver.find_element_by_id("login_field")
password = driver.find_element_by_id("password")
username.send_keys("kek1337")
time.sleep(1)
password.send_keys("p4ss")
time.sleep(1)
login_form = driver.find_element_by_xpath("//input[@value='Sign in']")
time.sleep(1)
login_form.click()
time.sleep(1)
prepend = ["tpope"]
for user in prepend:
for t in range(1, 100):
string = "https://github.com/{}/followers?page={}".format(user, t)
driver.get(string)
time.sleep(1)
follow_button = driver.find_elements_by_xpath("//button[@aria-label='Follow this person']")
try:
for i in follow_button:
print "Got some people"
i.submit()
except:
pass
time.sleep(1)
driver.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment