Python script to automatically send new files (in folder) to a contact (or group) on Whatsapp
-
Install selenium (pip install selenium)
-
Download Chrome driver having same version as per the Chrome Browser of your system. (https://chromedriver.chromium.org/downloads) You also need to pass the path of 'chromedriver'. For simplicity you can put it in the same folder where script.py resides.
-
Chromium Web Browser (sudo apt-get install chromium-browser)
- Contact(or Group name) to whom you want to send the file.
- Absolute Path of the folder you need to track
- Frequency of tracking the folder
Open Your Whatsapp on the Web whatsapp page in the Chromium Browser's instance (Instance will open automatically after the step1)
- It will find the Contact(or Group name) {may take time if name is deep in the list}
- Open that chat box
- Attach the file
- Send it.
- Repeat :)
Python 3.7.6
Ubuntu 20.04.2 LTS (64-bit)
- To share live logs of under development application with the team members.