I am a beginner in this.
I want to send a WhatsApp message to multiple users using web browser module (and not selenium). I have written the following code:
import webbrowser
msg = input('Enter a Message: ')
number = input('Enter contact number: ')
number = number.split(',')
for i in number:
web = webbrowser.open_new_tab(f'https://web.whatsapp.com/send?phone=+91{i}&text={msg}')
I know this is not the best approach as it opens up a WhatsApp tab as many as the total contact number entered by the user and I have to manually hit the send button each time in every tab.
Is there any better way than this?
Thanks in Advance