Wondering how to send WhatsApp messages using Python using only 3 lines of code? You have come to the right place!
You can do so by using a simple...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
I added the wrong path how and then keep getting the error of "Chromedriver not loaded"
How do I change the path so it can work again?
EDIT: I found the GitHub discussion of changing your set PATH but now I am getting an error about unicode truncation after I made it into a raw string I get a permisson error.
github.com/aahnik/wappdriver/discu...
I'm gettting the error: "ChromeDriver not loaded". Could you provide any help?
Please post the details in the discussion forum.
github.com/aahnik/wappdriver/discu...
Please provide additional details.
have you installed chrome driver ? the correct matching verison ?
have you entered the correct path when prompted ?
Hi José,
Set the ChromeDriver path when you call the webdriver.Chrome.
eg:
browser = webdriver.Chrome('/home/user/Python/ChromeDriver/chromedriver')
browser.get('twitter.com')
anyone have this error like me
Traceback (most recent call last):
File "test_whatsapp.py", line 1, in
from wappdriver import WhatsApp
File "/home/username/.local/lib/python3.8/site-packages/wappdriver/init.py", line 24, in
from .local import set_chrome_driver_path, update_selectors
File "/home/username/.local/lib/python3.8/site-packages/wappdriver/local.py", line 11, in
from verlat import latest
ImportError: cannot import name 'latest' from 'verlat' (/home/username/.local/lib/python3.8/site-packages/verlat/init.py)
Can we also send messages to groups or only to people?
you can send messages to groups also. just put the name of group, in the
to
parameterYou can send messages to Groups also. Just use the name of the group in the recipient's name.
Do we need to be logged in WhatsApp web for it to work? I didn't quite understand how it sends the message. Also, what about contacts saved as numbers only (no name but only phone number)?
Hi ! Thanks for asking. When you run the code shown, chrome will open whatsapp web. For the first time you need to scan QR code to login to whatsapp.
You can send only to saved contacts.
Otherwise whatsapp may block you for spamming.
For contacts saved only as phone number, it will work. Just put the phone number instead of name , in the
to
parameter of thesend
methodAmazing! Do we need to include the full number (with country code) like +1123456789 or only 123456789 will work?
exactly same as saved. Number must be saved
It doesn't support if the name contains space.
can you show a screen recording ? or terminal output ?
it is expected to work
hii aahnik
i check your github
s link (full documentation), but it links to same page, i
m looking for a way to send some pdf files to some different people.Hello I have this error
cannot import name 'WhatsApp' from partially initialized module 'wappdriver' (most likely due to a circular import)
did you name your file
wappdriver.py
? Dont do that. Learn more about imports.And by the way, wappdriver is not more maintained. See the github repo for notice.