This project is a Python-based Twitter bot that provides basic automation functionalities such as posting tweets, liking tweets, and performing sentiment analysis on tweets.
- Post Tweets: Post tweets automatically using the provided text.
- Like Tweets: Like tweets containing a specific keyword.
- Sentiment Analysis: Analyze the sentiment of a tweet using TextBlob.
-
Clone the repository:
git clone https://github.com/your_username/twitter-bot.git
-
Install dependencies:
cd twitter-bot pip install -r requirements.txt
-
Set up Twitter API credentials in
config.py
:consumer_key = 'YOUR_CONSUMER_KEY' consumer_secret = 'YOUR_CONSUMER_SECRET' access_token = 'YOUR_ACCESS_TOKEN' access_token_secret = 'YOUR_ACCESS_TOKEN_SECRET'
-
Post a tweet:
python bot.py post "Your tweet text here."
-
Like tweets containing a keyword:
python bot.py like "keyword"
-
Perform sentiment analysis on a tweet:
python bot.py analyze "Tweet text here."
Contributions are welcome! If you have any suggestions or find any issues, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.