GithubHelp home page GithubHelp logo

0xgrimnir / simple-retweet-bot Goto Github PK

View Code? Open in Web Editor NEW
45.0 3.0 40.0 8 KB

A Python-built Twitter retweet bot using Tweepy. Can do multiple keywords/hashtags.

License: MIT License

Python 100.00%

simple-retweet-bot's Introduction

Twitter Retweet Bot using Python & Tweepy

A Python-built Twitter retweet bot using Tweepy. Searches and retweets based on hashtag or keyword. Can do multiple keywords, or hashtags.

What You Need && Need to Know

  • Tweepy - An easy-to-use Python library for accessing the Twitter API.

pip install tweepy

Instructions

  • Out of general OS hygiene, create a new directory to contain all of your retweet bot files.

mkdir retweet-bot

  • Create a new Twitter Application. This is where you'll generate your keys, tokens, and secrets.
  • Fill in your keys, tokens, and secrets in the keys.py file.
  • Check comments in retweet.py to tweak the retweet bot to your liking.
  • The example demonstrates a single hashtag value, but you can tweak the code to search multiple hashtags. Example:

q='%23apples%20OR%20%23oranges' will search #apples OR #oranges

  • Run your retweet.py script. Enjoy!

python retweet.py

Additional Information

  • Note: Make sure that your retweet.py and keys.py files are, obviously, in the same directory.
  • Create a Cron Job or use Task Scheduler to automate this script.
  • Consider using a Raspberry Pi to host your retweet bot, so it's always on and always running. :)

simple-retweet-bot's People

Contributors

0xgrimnir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

simple-retweet-bot's Issues

Saving last Re-Tweeted ID

Hello, I love this twitter bot and I was wondering is there a way to save the last tweet id and write this to a file and recall it so the bot does not try and re-tweet previously re-tweeted statuses to avoid the errors? I am sorry if this is in the wrong place, I am new to github.

no attribute oAuthHandler

Traceback (most recent call last):
File "/Users/Windotosh/retweet-bot/retweet.py", line 13, in
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
AttributeError: module 'tweepy' has no attribute 'OAuthHandler'

After putting in my keys and all that

Task scheduler

Hey, everything works except when i create a task using task scheduler, it says it's running but nothing works, I have to open the python script myself which turns off after few seconds when the bot retweets all the tweets. I made my task to run indefinitely every day all time, but nothing works

Retweet from certain users

I want to be able to use this bot to retweet all tweets from a list of selected users. How would I do that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.