r/Python • u/[deleted] • Jul 01 '20
I Made This I made a Whatsapp Web API using Selenium! More info in comments!
4
u/enzoc96 Jul 01 '20
Congrats, it looks nice.
Once, I tried a WhatsApp bot but couldn't automate qr code scanning
3
Jul 01 '20
Whatsapp stores information about your device offline. Thats why if you close your browser, and reopen it, Whatsapp will still be logged in your device. I am trying to use Selenium to store the offline information, so you don’t have to scan the QR-code
2
u/-this-guy-fucks- Jul 02 '20
The QR code shifts every 7-10 seconds based on my testing, you need to grab it and “scan it” to authenticate fairly quickly. I had it so. Just presented the qrcode in jupyter and the user scans the page.
2
u/Bored_comedy Jul 02 '20
Hey what's the @client.command() thingy doing?
2
Jul 02 '20
Its a decorator for a new command in the client. You can look it up in the Whatsapp folder in the repository
2
1
1
0
6
u/[deleted] Jul 01 '20 edited Jul 01 '20
I am working on this project for quite a while now and I want to share it with you guys. I use the script you saw in the video for testing. Feel free to leave suggestions or feedback.
The API supports on loop listeners, on message listeners, custom process command functions, commands, sending messages, sending files and I am working on support for emojis, headless support and some other things
The GitHub is here