The above script sends message to any contact any number of times. It uses WhatsApp Web to accomplish that.
Install chromium driver for opening automated browser:
sudo apt-get install chromium-chromedriver
Install selenium module:
pip3 install selenium
Program can be run:
python3 whatsapp.py
Follow steps
Above program can be easily modified for various uses