The Twitter Post Automation project is designed to increase user engagement on a personal Twitter account, targeting individuals interested in technology and coding. The project utilizes Python, Tweepy, Github Actions, and REST APIs to achieve its objectives. ๐
-
- The script queries tweets related to the "100DaysOfCode" hashtag.
- Retrieves user details from the tweets and replies to them with a random encouraging quote to motivate them in their coding streak.
-
- Implements the functionality to extract random tech-meme images using JokeAPI.
- Posts the extracted meme images as tweets to add a humorous touch to the Twitter account.
-
- Utilizes GitHub Actions workflow to schedule project execution based on specific time intervals each day.
- Ensures that the automation runs seamlessly at predetermined times.
The main logic of the project is implemented in the Python script twitterBot_scratch.py
, which contains the following key sections:
-
- Queries tweets related to "100DaysOfCode" and replies with an encouraging quote.
-
- Fetches a random tech meme using the JokeAPI and posts it on Twitter.
- Handles exceptions gracefully to ensure robust execution. ๐ก๏ธ
-
- Utilizes Tweepy for Twitter API interactions.
- Includes necessary imports, credentials, and API setup. ๐
- Clone the repository to your local machine:
- Install the required dependencies:
pip install -r requirements.txt
- Set up your Twitter API credentials by creating a file named
credentials.py
and providing the required keys and tokens. - Adjust the scheduled execution time in the script if needed.
- Run the script:
python twitterBot_scratch.py
- Tweepy
- Requests
- PIL (Pillow)
Feel free to contribute, open issues, or provide feedback. ๐