Skip to main content

Automating WhatsApp using python with custom multiple messaging options, attachment options and supporting images and video sending

Project description

auto_whatsapp

Automating WhatsApp using python with custom multiple messaging options, attachment options and supporting images and video sending as well. auto_whatsapp also persist your login state once QR code is scanned on web whatsapp.

Setup

Installation

In the terminal type the following

pip install auto_whatsapp

Usage

Import auto_whatsapp module use its sendChat function to send messages.

from auto_whatsapp import auto_whatsapp

msg = 'This is a test message'
users = ["user1", "user2", "+91 9876543210"]
auto_whatsapp.sendChat(users, msg)

users1 and user2 are saved contact name according to your use case.
Messages can also be send to unsaved contacts like +91 9876543210 as shown above. Just run the code you can see the magic happening. It will open web whatsapp automatically send the given message to specified users.

Make sure you have selenium installed
pip install selenium
and have chromedriver in the same directory. If you don't have chromedriver installed click here


Examples

Sending a document

from auto_whatsapp import auto_whatsapp

users = ["user1", "user2", "+91 9876543210"]
src = 'C:\\Users\\Your_user\\Desktop\\dots.jpg'
auto_whatsapp.sendDoc(users, src)

Note that you have to provide absolute path as src argument and with double backslackes(\) as shown in example.

Sending a media

Media can be images, videos or audio which whatsapp supports.

from auto_whatsapp import auto_whatsapp

users = ["user1", "user2", "+91 9876543210"]
src = 'C:\\Users\\Your_user\\Desktop\\dots.jpg'
auto_whatsapp.sendMedia(users, src)

Note that you have to provide absolute path as src argument and with double backslackes(\) as shown in example.


License

auto_whatsapp is been licensed under MIT LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auto_whatsapp-0.0.5.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

auto_whatsapp-0.0.5-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page