All Projects → SerhiiStets → TweetyPy

SerhiiStets / TweetyPy

Licence: MIT license
Machine learning app that take data from the top trends on twitter and generate own tweets

Programming Languages

python
139335 projects - #7 most used programming language
Procfile
174 projects

TweetyPy

Twitter Follow



Tweetypy is a Machine learning app that can create own tweets by learning from user posts or top trend tweets using Markov chain. It can also create wordclouds based upon received twitter data. You can check him out at @TweetyPy

What can it do?

Create tweets with a certain topic from Twitter's trending page

Create tweets based upon specific user's history

Create word clouds by tweets topic

Installation

Clone this repo and install requirements.txt

$ git clone https://github.com/SerhiiStets/TweetyPy.git
$ pip install -r /path/to/requirements.txt

NOTE: TweetyPy uses Twitter API to send and read tweets, the keys are stored on the server

To run the bot you need to specify your own keys. To get Twitter API tokens please check out - How to get access to the Twitter API

auth = tweepy.OAuthHandler(os.getenv("API_key", "optional-default"), os.getenv("API_secret", "optional-default"))
auth.set_access_token(os.getenv("AT_token", "optional-default"), os.getenv("AT_secret", "optional-default"))

Right now TweetyPy uses Heroku config vars to get and store these API tokens

Usage

  1. Change API variables with your Twitter API keys. Check out Installation step to see where you can get Twitter API tokens
auth = tweepy.OAuthHandler(your_API_key, your_API_secret)  # Your API keys here
auth.set_access_token(your_AT_token, your_AT_secret)  # Your AI keys here
  1. Run tweetyPy.py file in TweetyPy folder
$ cd TweetyPy
$ python tweetyPY.py

Heroku

Bot is now running on Heroku. Using clock.py it reads and posts tweets every 4 hours

Contributing

All bugs, feature requests, pull requests, feedback, etc., are welcome. Create an issue

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].