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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file auto_whatsapp-0.0.5.tar.gz.
File metadata
- Download URL: auto_whatsapp-0.0.5.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c2577bbf3c9973bce5a0d95c7ffd666fefd85dd724f2961e9d6cbfd4d8cef85
|
|
| MD5 |
39a4fabbe90ec792821fa34942e2db1c
|
|
| BLAKE2b-256 |
0bcbdb6871900ae8bc80a8eb50dac68663b4dd2f3fc351cc5ec2c5d9ab474e60
|
File details
Details for the file auto_whatsapp-0.0.5-py3-none-any.whl.
File metadata
- Download URL: auto_whatsapp-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13f195297e21a618cc2a46c2f1d0dd7c971aaba567d6056c9003edc30527e47b
|
|
| MD5 |
80eadf5578e2607b7a78548029c8590e
|
|
| BLAKE2b-256 |
311a9330f3560ce9b27a118bfb131c9cf53ef47111caed5f86432099fb972064
|