1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Twitter Scripts - Batch Add, Get, Tweet

Discussion in 'Social Networking Sites' started by fuzion, Jul 6, 2009.

  1. fuzion

    fuzion Newbie

    Joined:
    Aug 9, 2008
    Messages:
    26
    Likes Received:
    336
    Occupation:
    suckering suckers and trolling trolls
    First post :) I've been lurking for a long ass time and finally decided to post something worthwhile.

    Here's my simple twitter script to grab your followers' followers. It has limits to try to keep you from getting banned, but make sure you only use it once per hour (or even per day) just to be safe.

    Code:
    hxxp://nukeit.org/stupid-bash-scripts-twitter-follower-grabber/
    And here's my stupid autofollow script. The above script generates lists of 1k users which you can plug into this one to follow 1k new people per day. It has a timer so you won't hit the hourly limits.

    Code:
    #!/bin/bash
    FILE="newfollows"
    exec < $FILE
    while read LINE
    do
    #twitter follow $LINE -e email -p password
    twitter follow $LINE -e email -p password
    sleep 37
    done
    
    I use Python Twitter Tools because it has nice features and does a lot of hard work that I could have spent hours writing in bash.

    Code:
    hxxp://mike.verdone.ca/twitter/
    To auto tweet something, use something like this. I dunno... I use hootsuite ;)

    Code:
    #!/bin/bash
    FILE="tweets"
    exec < $FILE
    while read LINE
    do
    twitter set $LINE -e email -p password
    sleep 3600 ## seconds
    done
    

    Tips :idea:

    Create multiple directories and copy the script into each one. Add you different account info to each script and start them. I've only tested it with two accounts at the same time, but any more and you might get :banned:.

    Add your 1k per day and wait 48h. Use something like refollow to remove those who don't follow you back. Repeat as long as you want :)

    The follow grabber tries to keep track of your followers and uses that list to keep your lists clean. This functionality might break or take forever if you already have a shit ton of followers.

    I got block banned a while back, some asshat blocked me :bawling: and I think I tried to follow him too many times and the bot got me. I had it reversed immediately, but its something you might watch out for.

    I don't know of any way off hand to find out who is blocking you, but if you have a way or a list, you need to make sure your new collections don't contain those who are blocking you.

    Disclaimer: :thefinger
    Don't come bitching to me if you can't get it to work, you do it wrong, or twitter changes something and you get banned.
    This will work on *nix, msys, and most shared boxes with ssh.
     
    • Thanks Thanks x 3
  2. c2h5oh

    c2h5oh Newbie

    Joined:
    Jun 17, 2009
    Messages:
    12
    Likes Received:
    6
    Here you are :)
    Code:
    import twitter
    import sys
    from sets import Set
     
    
    username='username'
    password='password'
     
    api=twitter.Api(username,password)
    
    followers = api.GetFollowers()
    followNames = Set()
    for follower in followers:
        followNames.add(follower.screen_name)
    
    friends = api.GetFriends()
    for friend in friends:
        if (not friend.screen_name in followNames):
            print friend.screen_name
            api.DestroyFriendship(friend.screen_name)
    
    This scrpit only unfollow ~30 at time, maybe someone knows better way.
    print friend.screen_name -> just to see who you unfollow
     
  3. funktrust

    funktrust Regular Member

    Joined:
    Apr 3, 2009
    Messages:
    208
    Likes Received:
    54
    Occupation:
    Cisco Engineer
    Location:
    Sydney
    Looks like a nice thread, will try it when I have some time... I have been wanting a script to follow my followers.
     
  4. c2h5oh

    c2h5oh Newbie

    Joined:
    Jun 17, 2009
    Messages:
    12
    Likes Received:
    6
    Just like in script above, just in compare friend list with followers list and follow that whos not in friends list
    Code:
    import twitter
    import sys
    from sets import Set
     
    
    username='username'
    password='password'
     
    api=twitter.Api(username,password)
    
    following = api.GetFriends()
    friendNames = Set()
    for friend in following:
        friendNames.add(friend.screen_name)
    
    followers = api.GetFollowers()
    for follower in followers:
        if (not follower.screen_name in friendNames):
            #api.CreateFriendship(follower.screen_name)
            print follower.screen_name
    
    Only one problem: api.CreateFriendship(follower.screen_name) doesn't work for me :(
    so i use output of this script and then use another scrip to follow.
    btw both scripts are python
     
  5. fuzion

    fuzion Newbie

    Joined:
    Aug 9, 2008
    Messages:
    26
    Likes Received:
    336
    Occupation:
    suckering suckers and trolling trolls
    I prefer to use refollow since it doesn't seem to eat up my own api credits.
     
  6. JayC71

    JayC71 Newbie

    Joined:
    Mar 18, 2009
    Messages:
    27
    Likes Received:
    3
    Have you been using this successfully? Any accounts suspended because of it?
     
  7. fuzion

    fuzion Newbie

    Joined:
    Aug 9, 2008
    Messages:
    26
    Likes Received:
    336
    Occupation:
    suckering suckers and trolling trolls
    just used it today to add another 200 or so, but only because I was already at 2k
     
  8. c2h5oh

    c2h5oh Newbie

    Joined:
    Jun 17, 2009
    Messages:
    12
    Likes Received:
    6
    I use it (well similar script i wrote my self) for about 5 days. No problems. Fully automated tweeting, following followers, unfollowing and finding new to follow (about 2 days). Just don't hit API limits too often and everything is OK
     
  9. cookiejar

    cookiejar Regular Member

    Joined:
    Dec 6, 2008
    Messages:
    400
    Likes Received:
    2,084
    Occupation:
    SeNIor CoOKIe Di$TRibuter
    Location:
    YoUR IP AddRESS
    Anyone has the API limits? Im using Humming B and Lively Browsers Twitter FA but Im getting mixed results because I think I break the limits and the ban hammer drops on some of my profiles.
     
  10. karkar

    karkar Newbie

    Joined:
    Oct 1, 2008
    Messages:
    13
    Likes Received:
    0
    Thanks alot for this mini scripts
    please any one tell me why none of this working for me
    should i put the .py file in specific path or name some name i mean i dont know why its not working noting that i used alot of python script before but nothing for twitter is working
    help me please
    thanks
     
  11. karkar

    karkar Newbie

    Joined:
    Oct 1, 2008
    Messages:
    13
    Likes Received:
    0
    Thanks alot for this mini scripts
    please any one tell me why none of this working for me
    should i put the .py file in specific path or name some name i mean i dont know why its not working noting that i used alot of python script before but nothing for twitter is working
    help me please
    thanks
     
  12. karkar

    karkar Newbie

    Joined:
    Oct 1, 2008
    Messages:
    13
    Likes Received:
    0
    How Can make this bash script work on windows. any help please
     
  13. fuzion

    fuzion Newbie

    Joined:
    Aug 9, 2008
    Messages:
    26
    Likes Received:
    336
    Occupation:
    suckering suckers and trolling trolls
    http://www.blackhatworld.com/blackhat-seo/social-networking-sites/119388-my-youtube-method-adv-linux.html#post1180053
     
  14. somedevil

    somedevil Jr. VIP Jr. VIP

    Joined:
    Sep 9, 2009
    Messages:
    1,009
    Likes Received:
    492
    Location:
    Dark side of the moon..
    Home Page:
    CAn someone tell me how to run this script on a mac ?
    i am new to all this ! :eek:

    thanks for the help