View Single Post
Old 06-11-2016, 08:58 AM  
johnnyloadproductions
Account Shutdown
 
Industry Role:
Join Date: Oct 2008
Location: Gone
Posts: 3,611
Clever trick to get over 1000 followers on Github in 1 week

Just follow a bunch of people. Unlike other social services there's no real foul for following people on github as you can't really spam up the service.

A small minority of people will reciprocate back and follow you, it's had a tapering off drip effect but I'm now above 1.1k followers. This puts me in the top 0.1% or so, which makes me feel very special, like a unique snowflake or something.

Why would you even want to do this? You could put it on a resume. Well then they'll just argue it's because you have all those people you are following, well you could just write a script to unfollow everyone.
...but then they would just see you have repositories that look anemic for stars or forks in relation to the number of followers you have.
Still, 1000 followers on a site like github is pretty impressive, even if it wasn't grown organically (:

Linus Torvolds has around 40k followers but follows no one.

At the worst you could say you just built an awesome bot and that's a reason to consider you.

Bots through the user list with the most followers, people most likely to respond too.

Here's the code:
Code:
from selenium import webdriver
import time
import sys
reload(sys)
sys.setdefaultencoding('utf-8')




#Firefox used
driver = webdriver.Firefox()
# base url
driver.get("http://github.com/login")

username = driver.find_element_by_id("login_field")
password = driver.find_element_by_id("password")

# password and username need to go into these values
username.send_keys("username for github")
time.sleep(1)
password.send_keys("password for github")
time.sleep(1)


login_form = driver.find_element_by_xpath("//input[@value='Sign in']")
time.sleep(1)
login_form.click()
time.sleep(1)

prepend = ["jashkenas", "ruanyf", "substack", "kennethreitz", "jlord", "daimajia", "mdo", "schacon", "mattt",
           "sindresorhus", "defunkt", "douglascrockford", "mbostock", "jeresig",
"mojombo", "addyosmani", "paulirish", "vczh", "romannurik", "tenderlove", "chriscoyier", "johnpapa", "josevalim",
           "charliesome", "CoderMJLee", "ry", "antirez", "muan", "isaacs", "angusshire",
"hadley", "hakimel", "yyx990803", "fat", "fabpot", "ibireme", "tekkub",
           "BYVoid", "laruence", "onevcat", "tpope", "mrdoob", "LeaVerou", "chrisbanes", "wycats", "lifesinger",
"cloudwu", "mitsuhiko", "michaelliao", "ryanb", "clowwindy", "JacksonTian", "yinwang0", "Trinea",
           "pjhyett", "dhh", "gaearon"]


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)

        # make sure to pick the correct directory to save the files to
        # follow_button = driver.find_elements_by_xpath("//button[@type='submit']")
        follow_button = driver.find_elements_by_xpath("//button[@aria-label='Follow this person']")

        # time.sleep(1)
        print len(follow_button)
        try:
            for i in follow_button:
                i.submit()
        except:
            pass
        time.sleep(1)



driver.close()
from 6-02-2016 to 6-11-2016





You are glad that I shared!
johnnyloadproductions is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote