craziks-creator / MarkovTweets

A Python twitter bot that uses a markov chain based sentence generator to fill in tweets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MarkovTweets

A Python twitter bot that uses a markov chain based sentence generator to fill in tweets.

Feature list:

  • Tag reply: replies to tweets that mention the bot.

  • Automatic tweets: randomly tweets sentences. Time interval can be adjusted at settings.

  • Current trends: trending hashtags can be added to tweets. The probability of using a hashtag can be adjusted at settings.

Installation:

pip install MarkovTweets

That's it! ✈

Download the quickstart script to your machine.

You can put your app account details by passing the API credential, like so:

api_public = "API_KEY"
api_private = "API_SECRET_KEY"
token_public = "ACCESS_TOKEN"
token_private = "ACESS_TOKEN_SECRET"

Set your bot username the same as your twitter username and reference the markov chain source. Here's a markov chain source example.

settings = {
    "markov_chain_source": "example_source.txt",
    "bot_username": "TWITTER_USERNAME",
}

To run MarkovTweets, you'll need to run the quickstart script you've just downloaded.

python quickstart.py

Example project:

Amlo Simulador

About

A Python twitter bot that uses a markov chain based sentence generator to fill in tweets.

License:MIT License


Languages

Language:Python 100.0%