Kalebu / alright

Python wrapper for WhatsApp web-based on selenium
https://www.youtube.com/watch?v=yitQTt-NukM
MIT License
376 stars 113 forks source link

Send File Did not Working #116

Closed Yohanes-arch closed 1 year ago

Yohanes-arch commented 1 year ago

Hi, so just straightforward, the send_file function did not work for me, it just showed the previews of the file but didn't send the file Here is the screenshot

Screenshot 2023-03-24 124856

The process stops right here and nothing happens when I keep waiting. This happens when I use the CLI, but the send_message is working properly. Then I tried this command through a python script, but both didn't work.

Ceserax commented 1 year ago

Same issue here. It stops and waits when it has to click and send the picture or video. Never had that problem but since a week or so this happens. Could it be the chrome driver version upgrade recently?


from alright import WhatsApp messenger = WhatsApp() numbers = ['+31xxxxxxxxx'] for number in numbers: messenger.find_user(number)

messenger.send_picture(
    "/Users/newfolder/Epex_Michel.png",'day-ahead prices')

This is where it stops:

Screen Shot 2023-03-29 at 22 02 19

And this is the output:

Screen Shot 2023-03-29 at 22 12 42

Btw. Messages are working fine.

Hope you can help

FrancescoLucarini commented 1 year ago

Me too same problem, also tried with keyboard or pyautogui to press enter, but not sending images

FrancescoLucarini commented 1 year ago

Any update or someone knows another solution?

farcas commented 1 year ago

Same for me. Any progress?

dellinfa commented 1 year ago

same problem for me with send_picture. @Kalebu any suggestion?

harry-py-bot commented 1 year ago

Yes, I am facing the same issue. I think the XPath of the text box and the sent button have to be modified to the updated version of google chrome. Because the text send_message function is working perfectly.

dellinfa commented 1 year ago

harry It's the same for me. Send_message work perfectly..

dellinfa commented 1 year ago

For all, see the pull request "xpath fix: send_picture xpaths updated" to solve the problem!

allesman commented 1 year ago

By the way, how are you guys even sending a message when find contact isn't working. Or does it work for you?

aeris07 commented 1 year ago

Hello, @farcas @dellinfa @allesman @FrancescoLucarini @Yohanes-arch @harry-py-bot

web.whatsapp.com has changed html structure recently, that's why a modification needed in the code, You can replace init.py of alright code with the updated document in the attachment, It works for sending messages, attachments and pictures. I haven't tried other functions by the way. Hope it helps. Best regards... init.zip

FrancescoLucarini commented 1 year ago

Thanks so much!

Kalebu commented 1 year ago

Hello, @farcas @dellinfa @allesman @FrancescoLucarini @Yohanes-arch @harry-py-bot

web.whatsapp.com has changed html structure recently, that's why a modification needed in the code, You can replace init.py of alright code with the updated document in the attachment, It works for sending messages, attachments and pictures. I haven't tried other functions by the way. Hope it helps. Best regards... init.zip

Thank you for this @aeris07, I launched a product on early April I have been crazy busy

Will replace the code in the main repository and then push it to PyPI.

Will keep you guys updated

psd-psd commented 1 year ago

Even I am facing the same issue