{"id":15636592,"url":"https://github.com/0xfuturistic/twitter-giveaways-bot","last_synced_at":"2025-04-14T06:12:39.716Z","repository":{"id":47019514,"uuid":"77160026","full_name":"0xfuturistic/Twitter-Giveaways-Bot","owner":"0xfuturistic","description":"A bot that will constantly look for new giveaways and contests on Twitter; and enter to all of them! It will do whatever it's needed, either retweeting or liking something, or even following and DMing someone :D","archived":false,"fork":false,"pushed_at":"2021-09-16T23:55:50.000Z","size":41,"stargazers_count":130,"open_issues_count":26,"forks_count":41,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-14T06:12:35.249Z","etag":null,"topics":["bot","giveaways","twitter","twitter-account","twitter-giveaway"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xfuturistic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-22T16:34:12.000Z","updated_at":"2025-04-12T06:18:14.000Z","dependencies_parsed_at":"2022-09-16T13:50:30.056Z","dependency_job_id":null,"html_url":"https://github.com/0xfuturistic/Twitter-Giveaways-Bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfuturistic%2FTwitter-Giveaways-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfuturistic%2FTwitter-Giveaways-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfuturistic%2FTwitter-Giveaways-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfuturistic%2FTwitter-Giveaways-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xfuturistic","download_url":"https://codeload.github.com/0xfuturistic/Twitter-Giveaways-Bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830398,"owners_count":21168272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","giveaways","twitter","twitter-account","twitter-giveaway"],"created_at":"2024-10-03T11:05:23.304Z","updated_at":"2025-04-14T06:12:39.668Z","avatar_url":"https://github.com/0xfuturistic.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter Giveaways Bot\n\nA bot that will constantly look for new *giveaways* and *contests* on **Twitter**; and enter to *all* of them!\nIt will do whatever it's needed, either retweeting or liking something, or even following and DMing someone :D\n\nLimits are pretty high; the bot can enter to more than **1000 giveaways per day**, so it's likely that you'll win several giveaways :)\n\n## What's new? 😃\n* Added ban keyword list (ignore tweets that contain certain keywords)\n* Don't retweet tweets that have a few numbers of retweets (to avoid retweeting fake giveaways)\n* Don't retweet old tweets (you can set the bot to ignore tweets that're older than 30 days for example)\n\n\n## Getting Started\n\nThese instructions will get your bot started in minutes.\n\n### Prerequisites\n\nThings you need to have installed in order to be able to run the script.\n\n```\nPython 3.5\npython-twitter\n```\n\n### Installing\n\nFirst of all, if you don't already have Python in your system, [download](https://www.python.org/downloads/) and install it now. Once that's done, for the \nscript to be able to work with Twitter you'll need to install its API\n\n```\npip install python-twitter\n```\nYou should also download both scripts: ``main.py`` and ``config.py``. Preferably, put them in the same folder.\n\nOnce there, open the ``config.py`` file with a text editor; don't run it!\nThis file has all the variables the main script will use. Give each one of them the values you want, or just leave them by default.\n\nHowever, you do need to change the first variable: ``twitter_credentials``. As it contains all the credentials related to the Twitter API; \nthey can't stay blank (what's by default) if you want the bot to connect to Twitter.\n\n#### Twitter App\nThis is meant to be a short guide on how to get the twitter credentials your bot will need. Here I assume you already have Twitter account, if you don't please make one now. \n##### Steps: \n* Enter to [Twitter Apps](https://apps.twitter.com/) and click the `Create New App` button\n* Fill out all details and create the app\n* Enter to the ``Keys and Access Token`` section and create a new access token. \n* Now copy ``Consumer Key``, ``Consumer Secret``, ``Access Token``, ``Access Token Secret`` and paste them into their right place inside\nthe ``config.py``'s ``twitter_credentials`` variable.\n\nIf you've followed the steps correctly, now to start the bot you just need to run the ``main.py`` script. **Experiment with the variables at your own risk.**\n\n## How it works\nAs soon as the script starts, the bot authenticates to Twitter and searches for tweets with the tags given in the ``search_tags`` variable. It stores them in a list so then in can \niterate through each one of them, and checks if they contain any ``retweet_tags``; it would be very weird not having to retweet anything, that usually means you have to open a link\nto enter, thus it isn't a Twitter giveaway anymore and we skip the whole tweet.\n\n\nIf it does contain a ``retweet_tag``, the bot retweets it and proceeds to check if it has any\n* ``message_tag``\n* ``follow_tag``\n* ``like_tag``\n\n \nIf the bot finds them in the tweet's text, it'll do its right action. You can find more info in ``config.py``. \n\nOnce the bot is done with analyzing tweet and entering to the giveaway, it will sleep for the seconds defined in the ``retweet_rate`` variable; this is \nwhat will avoid the bot getting banned, or what will get the bot banned. \nAfter the bot has checked all tweets in the list, the script sleeps for the value defined in ``search_rate`` and the loop stars again. \n\nTo check the limits Twitter sets please refer to [Twitter's Rate Limits](https://dev.twitter.com/rest/public/rate-limits) and [Twitter’s Account Limits](https://support.twitter.com/articles/344781).\n\n*The bot prints everything into the console with colors and all, so it's easy to see what's going on. And all files are well commented*\n\n## Disclaimer\n\nThis is entirely for educational purpose. Use at your own risk and responsibility, there's a possibility that your Twitter account gets banned. I hold no liability for what you use the bot for or the consequences.\n\n## Authors\n\n* **Diego Estevez** - Please check out my [blog](https://www.diegoestevez.me), you'll love my other projects!\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n## Troubleshooting\n\nRate limit exceeded =\u003e All info [here](https://github.com/imdiegoestevez/Twitter-Giveaways-Bot/issues/1)\n\n## Acknowledgments\n\n* Thank you [Hunter Scott](http://www.hscott.net/twitter-contest-winning-as-a-service/) for your inspiration!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfuturistic%2Ftwitter-giveaways-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xfuturistic%2Ftwitter-giveaways-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfuturistic%2Ftwitter-giveaways-bot/lists"}