zvovov / whatsapp-web

WhatsApp chat from [command line, terminal, console, cli] :no_mobile_phones:
MIT License
310 stars 76 forks source link

Insights for new features #6

Closed paolospane closed 3 years ago

paolospane commented 6 years ago

Dear, I would like to share with u an Insights:

Best Regards, Paolo

zvovov commented 6 years ago

Is It possible read the whatsapp db? Possible? Yes. Does it work now? No. If the answer at the previous question is no. Is it possible redirect the chat (send and receive in a external DB)? You can try saving your console logs to save chats. When can we "download/upload" attach? Would need to find a way to share non-text data between console and Chrome Exist an catch function that is the trigger for external code?(when i receive the messages i would like to exec some external program and send automatic answer). You can add a listener for an additional keyword that does that.

tomasi-o commented 6 years ago

Is ist possible to run whatsapp-cli w/o the Chrome Browser?

zvovov commented 6 years ago

In theory, yes. Replacing chromedriver with a headless browser will make it work without Chrome browser. Chrome also started supporting headless mode recently, if I recall correctly. The only thing to really work on would be a way to authenticate using the QR code. If you find a way to transfer the QR code from the whatsapp web website to the console (and repeatedly poll the site, because the QR code changes automatically every 10 seconds or so) then there's no need of any GUI browser.

thatskriptkid commented 6 years ago

@zvovov Hi! Can your library subscribe to user presence status?

zvovov commented 6 years ago

No, it cannot yet. But it's a good idea.

Camps94 commented 6 years ago

Heyyy amazing project! Many thanks! I'm trying to send images too! Do you know I could implement this feature? Do you think it's possible to load the script in a machine in pythoneverywhere that could send a message periodically or it'snt possible because it has to verify your phone everytime except when you run it in your terminal I mean..

Sorry if my questions are too basic :(

Best regards

nakiom commented 6 years ago

Is there any way to send a message to unsaved contacts?

zvovov commented 6 years ago

@Camps94 Sharing images is possible. To do that, you'll have to get your hands dirty and write some code. To download an image, there should be a hyperlink to the image in the HTML of the chat page, retrieve that and you can save the image. Uploading an image is tricky. You'd have to click the 'attach' image button and if it gives a window to select images to upload, then all you need to figure out somehow is, a way to select that image through the shell.

On hosting the script online, I'm not sure if any hosting service would allow you to open a chrome window within the server. If you own the server, you can try. Authentication will be required only once

zvovov commented 6 years ago

@nakiom If you've messaged the contact at least once, you should be able to type their number and chat with them. Not sure if the code searches within the current chats, or all contacts. If it searches in the current chats, you should be able to search for a number and chat

metin02oktay commented 6 years ago

@zvovov On hosting server we can use "VNC server" once time, please add "send file" feature. I can write python script :(

metin02oktay commented 6 years ago

I'll use it to send large files with base64 ... Could you help me with this?

zvovov commented 3 years ago

@metin02oktay Please raise a PR with your code and let's take it from there