GithubHelp home page GithubHelp logo

tweepyautomation's Introduction

Twitter Post Automation ๐Ÿš€

Overview

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. ๐ŸŒ

Features

  1. Encouraging 100DaysOfCode Tweets ๐Ÿ’ฌ:

    • 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.
  2. Tech-Meme Posting ๐Ÿ˜„:

    • 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.
  3. Scheduled Execution with GitHub Actions ๐Ÿ•’:

    • Utilizes GitHub Actions workflow to schedule project execution based on specific time intervals each day.
    • Ensures that the automation runs seamlessly at predetermined times.

Code Structure

The main logic of the project is implemented in the Python script twitterBot_scratch.py, which contains the following key sections:

  • Tweet Encouragement Logic:

    • Queries tweets related to "100DaysOfCode" and replies with an encouraging quote.
  • Tech-Meme Posting Logic:

    • Fetches a random tech meme using the JokeAPI and posts it on Twitter.
    • Handles exceptions gracefully to ensure robust execution. ๐Ÿ›ก๏ธ
  • Authentication and Setup:

    • Utilizes Tweepy for Twitter API interactions.
    • Includes necessary imports, credentials, and API setup. ๐Ÿ”

Output Examples

image

image

Info2

image

How to Use

  1. Clone the repository to your local machine:
  2. Install the required dependencies:
    pip install -r requirements.txt
  3. Set up your Twitter API credentials by creating a file named credentials.py and providing the required keys and tokens.
  4. Adjust the scheduled execution time in the script if needed.
  5. Run the script:
    python twitterBot_scratch.py

Dependencies

  • Tweepy
  • Requests
  • PIL (Pillow)

Feel free to contribute, open issues, or provide feedback. ๐ŸŽ‰

tweepyautomation's People

Contributors

shivayemodi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.