mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.03k stars 796 forks source link

Do I have to scan the QR code every time ? #49

Closed lambasoft closed 6 years ago

lambasoft commented 6 years ago

Hello,

First of all, please change the qr selector to the following in order for the app to work: qrCode': "#app img:first-of-type"

On the other hand, I was wondering if there's a way not to scan the QR code on ever run, just scan it the first time and that's it. Because in my case, every-time I run my script, the firefox pops up asking again to scan the QR code even when I already did.

I'm using the code in sample.py

Thanks a lot!

m7mdcc commented 6 years ago

I think you can play with localStorage on browser to solve this

Ch-Sh commented 6 years ago

@m7mdcc could u give more hints or instruction how I can do that?

m7mdcc commented 6 years ago

Look @ this : https://github.com/Mawalu/whatsapp-phishing

codemanat commented 6 years ago

For someone who comes up with this question, try to follow the steps provided in this README.md.

cingcacing commented 6 years ago

@codemanat not working too, somehow the driver keep opening "new" session and asking for QR scan.

Ch-Sh commented 6 years ago

@codemanat thanks, but sorry I follow the instruction but can not setup firefox-cache correctly. After intteruption of loading QR code. Just the API.png got saved. No firefox-cache found. I created the folder manually and move the image into it, then setup the firefox manage and chose the firefox-Cache folder. But when I start the firefox, I am supposed to login with Firefox account. Got confused. From my understanding, this operation should create remote persistence login instead of QRcode scanning. Is that right?

Ch-Sh commented 6 years ago

@m7mdcc Well, the project looks really "hacker". I just followed the instruction. But when I run: node index.js and go the localhost. The page has no QR code but just "Loading". Not sure I did something wrong. Following is what I gor after runing the npm install and node index.js:

screen shot 2017-12-14 at 11 51 11 screen shot 2017-12-14 at 11 51 17

Any help is welcomed.

lambasoft commented 6 years ago

I got this working by using the chromedriver. The Firefox integration is very complex and hard to implement.

You will have to add the 'user-data-dir' argument to the chrome driver to save the session.

codemanat commented 6 years ago

@cingcacing Have you configured the Firefox-Profile to use the created cache directory? Maby try to change it also on the default profile and see if its working.

Alternatively, try to use the chromedriver as @lambasoft already mentioned. The only caveat at the moment is, that it dosent support BMPEmoji-Unicode-Characters.

cingcacing commented 6 years ago

@codemanat yes, tried firefox -P with no luck

Got working with chromedriver, no need for emojis thing since the bot only doing a server monitoring.

adarshsanjeev commented 6 years ago

Persistent login added in latest version