This script allows you to spam messages to a contact on WhatsApp using Selenium.
- Python 3.x
- Selenium
- Chrome WebDriver
- Google Chrome browser
-
Make sure you have Python installed on your system. If not, you can download and install it from python.org.
-
Install the required Python packages using pip:
pip install selenium
-
Download the Chrome WebDriver from the official site and place it in your system's PATH.
-
Ensure you have Google Chrome installed on your system. If not, you can download and install it from here.
-
Clone this repository or download the script (
whatsapp_message_sender.py) to your local machine. -
Open a terminal or command prompt and navigate to the directory where the script is located.
-
Run the script using the following command:
python whatsapp_message_sender.py --name [CONTACT_NAME] --word [MESSAGE_WORD] --times [NUM_TIMES]
Replace
[CONTACT_NAME]with the name of the contact you want to send messages to,[MESSAGE_WORD]with the word you want to send, and[NUM_TIMES]with the number of times you want to send the word. -
Follow the instructions in the terminal. You may need to scan the QR code using your phone to log in to WhatsApp Web.
-
Once logged in, the script will automatically find the specified contact and start sending the messages.
- Make sure you have a stable internet connection while running the script.
- The script waits for 20 seconds after opening WhatsApp Web to allow time for scanning the QR code. You can adjust this wait time if needed.
- Avoid running multiple instances of the script simultaneously to prevent conflicts with the WebDriver.
- Use this script responsibly and respect the privacy of others. Automated messaging should only be used for legitimate purposes and in compliance with WhatsApp's terms of service.