Skip to content

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

License

Notifications You must be signed in to change notification settings

SerhiiStets/TweetyPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published