This repository contains code for a Twitter bot that generates tweets using ChatGPT language model.
chatGPT.py
: Is used to generate text for the tweet from the botmail.py
: Is used to get the verification code from the inbox during creating a bottweet.py
: Is used to post a tweet using selenium
- Python 3.6 or later
- OpenAI API key
- Selenium WebDriver
- ChromeDriver (or other WebDriver executable)
- Clone the repository to your local machine.
- Install the required dependencies listed in
requirements.txt
. - Replace the placeholder values in
config.py
with your own Twitter and OpenAI API credentials. - Run
mail.py
to retrieve the verification code sent by Twitter to your email inbox. - Paste the verification code into
config.py
. - Modify the prompt in
chatGPT.py
to generate your desired tweet. - Run
tweet.py
to post the generated tweet to your Twitter account.
This project is licensed under the MIT License. Feel free to use and modify the code as per your requirements.