Giter Club home page Giter Club logo

py-connector-whatsapp-unofficial's Introduction

WhatsApp Automation Bot

This project is a WhatsApp automation bot developed using Selenium WebDriver. The bot provides various functionalities such as logging in, sending messages, sending media, and checking for new messages on WhatsApp Web.

Features

  • Login Automation: Automatically logs into WhatsApp Web and persists session data.
  • Message Sending: Send text messages and media (images/videos) to specific contacts.
  • Chat Management: Open chats by contact name and navigate through chats.
  • QR Code Generation: Generates QR codes for WhatsApp Web login.
  • Message Retrieval: Retrieve the last message from a chat.
  • New Message Notifications: Check for new messages and handle notifications.

Installation

To use this bot, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/marco0antonio0/py-connector-whatsapp-unofficial
    cd py-connector-whatsapp-unofficial
  2. Install Dependencies: Ensure you have Python installed. Then install the required Python packages:

    pip install selenium webdriver-manager pillow
  3. Start the code of the path main: for the start python script, so execute :

    python3 main.py
  4. Now to necessary login: The login is necessary for the use script where is execute in localhost when the your machine Now check if the bash console is if the show you an qrcode message

  5. Now this code is Already complete start: The started progamme is sucessfull

How to usage the functionalidades of checking message and obtain last message of the contact

  • The guide thating is the main.py file

How to usage functionalidade

  1. Initialize the Bot:

    from services import automation
    # with interface = true
    #without interface = false // terminal acess
    bot = automation(gui=False)
  2. Start the Bot:

    # if gui= true so the show with interface
    # else so the without interface
    bot.start(gui=false)
  3. Send a Message:

    bot.openChatByContact("Contact Name")
    bot.sendMensage("Hello, this is a test message!")
  4. Send an Image with Text:

    bot.sendImageWithText("path/to/image.jpg", "Here is an image with a caption!")
  5. Check for New Messages:

    new_message = bot.VerificarNovaMensagem()
    if new_message:
        print("New message from:", new_message)
  6. Retrieve Last Message:

    last_message = bot.pegar_ultima_mensagem()
    print("Last message:", last_message)
  7. Exit the Bot:

    bot.exit()

Project Structure

py-connector-whatsapp-unofficial/

├──main.py
├── requirements.txt # List of dependencies
├── README.md        # Project documentation
├── dados/           # Directory to store session data
└──servies/
        ├── bot.py            # Main bot class and functionalities
        └── generateQRcode.py # QR code generation module

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Open a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Contact

For any questions or suggestions, feel free to open an issue or contact me at [email protected].

py-connector-whatsapp-unofficial's People

Contributors

marco0antonio0 avatar

Stargazers

 avatar Anthony Mayron Lopez Oquendo avatar Michael Appiah avatar Kaan Özkan avatar

Watchers

 avatar

Forkers

tinny-robot

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.