Tithibots / tithiwa

Automate Web WhatsApp with selenium in python.
MIT License
24 stars 22 forks source link

Add scrap_chat() in class Chatroom to scrap full chat of some contact. #27

Open NavpreetDevpuri opened 3 years ago

NavpreetDevpuri commented 3 years ago

For now, just scrap text only but we can also scrap images, audio or videos, or stickers.

Vipul-Bajaj commented 3 years ago

What is expected after scrapping text, do u want to copy into some file or anything else?

NavpreetDevpuri commented 3 years ago

@Vipul-Bajaj You can try, just select multiple messages in WhatsApp and copy those let me show you and example

[10/11, 10:01 PM] +91 75470 41092: Why do people have negative perspective for Dhruv Rathee? Just curious.
[10/11, 10:02 PM] +91 88792 00285: Because he has been proven wrong so many times, that it is now a default assumption that whatever he says will be false until proven otherwise
[10/11, 10:10 PM] +91 75470 41092: Who has proven him wrong?
[10/11, 10:11 PM] +91 75470 41092: The fun fact is that he never passes his judgment on any issue, he just states facts related to it.
[10/11, 10:22 PM] +91 88792 00285: That's the point. Those aren't facts
[10/11, 10:23 PM] +91 75470 41092: They are facts.

And there is an option to export chat but I noticed it does not work well, I mean I noticed it does not export all old chats and only exports simple text file. There is some bug inside WhatsApp but I believe we can do that with selenium and it sounds interesting like how about if we improve our method at a level that one day it exports a pdf or Html of full chat. WhatsApp Image 2020-10-13 at 10 50 14 PM