italoseara / whatsappy

A whatsapp api made with selenium in Python
MIT License
42 stars 8 forks source link

Add support for every language #18

Open ghost opened 1 year ago

ghost commented 1 year ago

I wrote a simple echo bot for testing

from whatsappy import Whatsapp

whatsapp = Whatsapp()

@whatsapp.event
def on_ready():
    print("WhatsApp Web is ready!")

@whatsapp.event
def on_message(chat):
    chat.reply(chat.message)

whatsapp.run()

while True:
    pass

chat.reply is not working, it gives me timeout then i got this error:

Message: 
Stacktrace:
Backtrace:
    GetHandleVerifier [0x01088893+48451]
    (No symbol) [0x0101B8A1]
    (No symbol) [0x00F25058]
    (No symbol) [0x00F50467]
    (No symbol) [0x00F5069B]
    (No symbol) [0x00F7DD92]
    (No symbol) [0x00F6A304]
    (No symbol) [0x00F7C482]
    (No symbol) [0x00F6A0B6]
    (No symbol) [0x00F47E08]
    (No symbol) [0x00F48F2D]
    GetHandleVerifier [0x012E8E3A+2540266]
    GetHandleVerifier [0x01328959+2801161]
    GetHandleVerifier [0x0132295C+2776588]
    GetHandleVerifier [0x01112280+612144]
    (No symbol) [0x01024F6C]
    (No symbol) [0x010211D8]
    (No symbol) [0x010212BB]
    (No symbol) [0x01014857]
    BaseThreadInitThunk [0x75EE0099+25]
    RtlGetAppContainerNamedObjectPath [0x774C7B6E+286]
    RtlGetAppContainerNamedObjectPath [0x774C7B3E+238]
ghost commented 1 year ago

chrome 113

MartinchooxDEV commented 1 year ago

Same Error and same Chrome Version

MartinchooxDEV commented 1 year ago

@f-x-fx I have the solution, you have to change the language of whatsapp to English, in my case I had it in Spanish, change it from the mobile, delete the cookies, change the one from the browser and it will work, I tried it and it works

italoseara commented 1 year ago

@f-x-fx I have the solution, you have to change the language of whatsapp to English, in my case I had it in Spanish, change it from the mobile, delete the cookies, change the one from the browser and it will work, I tried it and it works

i'm sorry for that, i'll try to make it work for every language, but as i'm working with webscrapping, i'm quite limited. Thank you for sharing, if you have a solution, fell free to make a pull request.