italoseara / whatsappy

A whatsapp api made with selenium in Python
MIT License
43 stars 8 forks source link
automation bot chat iot messaging python whatsapp whatsapp-web

Whatsappy 4.2.0

License: MIT Downloads

Project Update: Temporary Inactivity

Unfortunately, this repository is currently non-functional. I plan to allocate time in the future to revitalize it and ensure its usability. In the meantime, I hope this proves helpful to those embarking on their own adaptations. Thank you for your understanding.

Overview

Whatsappy is a Python library for interacting with WhatsApp Web using Selenium. With this library, you can automate WhatsApp tasks such as sending messages, creating groups, and more.

Requirements

Installation

You can install Whatsappy using pip:

pip install whatsappy-py

Usage

Here's an example of how you can use Whatsappy to send a message:

from whatsappy import Whatsapp

# Create a new instance of Whatsapp
whatsapp = Whatsapp()

# Create event handlers
@whatsapp.event
def on_ready():
    print("WhatsApp Web is ready!")

@whatsapp.event
def on_message(chat):
    print(f"New message from {chat.name}: {chat.message}")

# Open WhatsApp Web in Chrome
whatsapp.run()

# Select the chat you want to send a message to
chat = whatsapp.open("John Smith")

# Send a message
chat.send("Hello, John!")

# Close WhatsApp Web
whatsapp.close()

API Reference

Whatsapp

Properties

Methods

Me

Properties

Chat

Properties

Methods

Group

Properties

Methods

Message

Properties

Methods

UnreadMessage

Properties

Methods

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Donation

If you like this project, please consider donating to help me continue working on it.

License

Whatsappy is licensed under the MIT License