{ "info": { "author": "Randal S. Olson", "author_email": "rso@randalolson.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Internet" ], "description": "#Twitter Bot\n\nA Python bot that automates several actions on Twitter, such as following users and favoriting tweets.\n\n##Disclaimer\n\nI hold no liability for what you do with this bot or what happens to you by using this bot. Abusing this bot *can* get you banned from Twitter, so make sure to read up on [proper usage](https://support.twitter.com/articles/76915-automation-rules-and-best-practices) of the Twitter API.\n\n##Installation\n\nYou can install the Twitter Follow Bot using `pip`:\n\n pip install TwitterFollowBot\n\n##Dependencies\n\nYou will need to install Python's [python-twitter](https://github.com/sixohsix/twitter/) library:\n\n pip install twitter\n\nAlthough this library should be installed along with the Twitter Follow Bot if you used `pip`.\n\nYou will also need to create an app account on https://dev.twitter.com/apps\n\n1. Sign in with your Twitter account\n2. Create a new app account\n3. Modify the settings for that app account to allow read & write\n4. Generate a new OAuth token with those permissions\n\nFollowing these steps will create 4 tokens that you will need to place in the configuration file discussed below.\n\n##Usage\n\n###Configuring the bot\n\nBefore running the bot, you must first set it up so it can connect to the Twitter API. Create a config.txt file and fill in the following information:\n\n OAUTH_TOKEN:\n OAUTH_SECRET:\n CONSUMER_KEY:\n CONSUMER_SECRET:\n TWITTER_HANDLE:\n ALREADY_FOLLOWED_FILE:already-followed.txt\n FOLLOWERS_FILE:followers.txt\n FOLLOWS_FILE:following.txt\n USERS_KEEP_FOLLOWING:\n USERS_KEEP_UNMUTED:\n USERS_KEEP_MUTED:\n FOLLOW_BACKOFF_MIN_SECONDS:10\n FOLLOW_BACKOFF_MAX_SECONDS:60\n \n`OAUTH_TOKEN`, `OAUTH_SECRET`, `CONSUMER_KEY`, `CONSUMER_SECRET` are your API keys that you received from creating your app account. `TWITTER_HANDLE` is your Twitter name, case-sensitive.\n\nYou can change the `FILE` entries if you want to store that information in a specific location on your computer. By default, the files will be created in your current directory.\n\nAdd comma-separated Twitter user IDs to the `USERS_KEEP` entries to:\n\n* `USERS_KEEP_FOLLOWING`: Keep following these users even if they don't follow you back.\n\n* `USERS_KEEP_UNMUTED`: Keep these users unmuted (i.e., you receive a mobile notification when they tweet)\n\n* `USERS_KEEP_MUTED`: Keep these users muted (i.e., you don't receive a mobile notification when they tweet)\n\nFor example:\n\n ...\n FOLLOWS_FILE:following.txt\n USERS_KEEP_FOLLOWING:1234,1235,1236\n USERS_KEEP_UNMUTED:\n ...\n \nYou can look up a users' Twitter ID [here](http://tweeterid.com/).\n\n###Create an instance of the bot\n\nTo create an instance of the bot:\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n \nBy default, the bot will look for a configuration file called `config.txt` in your current directory.\n \nIf you want to use a different configuration file, pass the configuration file to the bot as follows:\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot(\"my-other-bot-config.txt\")\n \nNote that this allows you to run multiple instances of the bot with different configurations, for example if you run multiple Twitter accounts:\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_other_bot = TwitterBot(\"my-other-bot-config.txt\")\n\n###Syncing your Twitter following locally\n\nDue to Twitter API rate limiting, the bot must maintain a local cache of all of your followers so it doesn't use all of your API time looking up your followers. It is highly recommended to sync the bot's local cache daily:\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.sync_follows()\n \nThe bot will create cache files where you specified in the configuration file.\n \n**DO NOT** delete the cache files (\"followers.txt\", \"follows.txt\", and \"already-followed.txt\" by default) unless you want to start the bot over with a fresh cache.\n\n###Automating Twitter actions with the bot\n\nThis bot has several functions for programmatically interacting with Twitter:\n\n####Automatically follow any users that tweet something with a specific phrase\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.auto_follow(\"phrase\")\n \nYou can also search based on hashtags:\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.auto_follow(\"#hashtag\")\n \nBy default, the bot looks up the 100 most recent tweets. You can change this number with the `count` parameter:\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.auto_follow(\"phrase\", count=1000)\n \n####Automatically follow any users that have followed you\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.auto_follow_followers()\n\n####Automatically follow any users that follow a user\n \n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot() \n my_bot.auto_follow_followers_of_user(\"jack\", count=1000)\n\n####Automatically favorite any tweets that have a specific phrase\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.auto_fav(\"phrase\", count=1000)\n \n####Automatically retweet any tweets that have a specific phrase\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.auto_rt(\"phrase\", count=1000)\n\n####Automatically unfollow any users that have not followed you back\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.auto_unfollow_nonfollowers()\n \nIf there are certain users that you would like to not unfollow, add their user id to the USERS_KEEP_FOLLOWING list.\n\nYou will need to manually edit the code if you want to add special users that you will keep following even if they don't follow you back.\n\n####Automatically unfollow all users.\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.auto_unfollow_all_followers()\n \n\n\n####Automatically mute all users that you have followed\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.auto_mute_following()\n\nYou will need to manually edit the code if you want to add special users that you will not mute.\n\n####Automatically unmute everyone you have muted\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.auto_unmute()\n \nYou will need to manually edit the code if you want to add special users that will remain muted. \n\n####Post a tweet on twitter\n\n from TwitterFollowBot import TwitterBot\n \n my_bot = TwitterBot()\n my_bot.send_tweet(\"Hello world!\")\n \n##Have questions? Need help with the bot?\n\nIf you're having issues with or have questions about the bot, please [file an issue](https://github.com/rhiever/twitter-follow-bot/issues) in this repository so one of the project managers can get back to you. Please check the existing (and closed) issues to make sure your issue hasn't already been addressed.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rhiever/TwitterFollowBot", "keywords": "Twitter,followers,automation,bot", "license": "GNU/GPLv3", "maintainer": null, "maintainer_email": null, "name": "TwitterFollowBot", "package_url": "https://pypi.org/project/TwitterFollowBot/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/TwitterFollowBot/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/rhiever/TwitterFollowBot" }, "release_url": "https://pypi.org/project/TwitterFollowBot/2.0.2/", "requires_dist": null, "requires_python": null, "summary": "A Python bot that automates several actions on Twitter, such as following users and favoriting tweets.", "version": "2.0.2" }, "last_serial": 1672971, "releases": { "2.0.1": [], "2.0.2": [ { "comment_text": "", "digests": { "md5": "65ed36f44020b10bb06a465651c29356", "sha256": "fa9f1b85661dcb5330736569945bc14ada5262805756028ba3ca6a92e0a8837a" }, "downloads": -1, "filename": "TwitterFollowBot-2.0.2.tar.gz", "has_sig": false, "md5_digest": "65ed36f44020b10bb06a465651c29356", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22772, "upload_time": "2015-08-11T13:09:51", "url": "https://files.pythonhosted.org/packages/21/41/38702bb50d3c644031a4ec2f274296a6d55ee6e5cff477702193b6a457f2/TwitterFollowBot-2.0.2.tar.gz" } ], "v2.0": [ { "comment_text": "", "digests": { "md5": "221427902463a7d7a5e060542133479b", "sha256": "aeb2d6c87ad69fa5467bc8a460e17b08481924eb810444dc9fb221e06e9697d6" }, "downloads": -1, "filename": "TwitterFollowBot-v2.0.tar.gz", "has_sig": false, "md5_digest": "221427902463a7d7a5e060542133479b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22815, "upload_time": "2015-05-18T23:32:07", "url": "https://files.pythonhosted.org/packages/98/34/0ababc40227dee9297f8c1fe01f67df78dac5f63c3ef2c5c541632dbcc90/TwitterFollowBot-v2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "65ed36f44020b10bb06a465651c29356", "sha256": "fa9f1b85661dcb5330736569945bc14ada5262805756028ba3ca6a92e0a8837a" }, "downloads": -1, "filename": "TwitterFollowBot-2.0.2.tar.gz", "has_sig": false, "md5_digest": "65ed36f44020b10bb06a465651c29356", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22772, "upload_time": "2015-08-11T13:09:51", "url": "https://files.pythonhosted.org/packages/21/41/38702bb50d3c644031a4ec2f274296a6d55ee6e5cff477702193b6a457f2/TwitterFollowBot-2.0.2.tar.gz" } ] }