This is a python script to convert whatsapp chats text file to JSON
Export your whatsapp chat file as a txt from your whatsapp chat:
- Click on the three dots on the top right corner of the personal chat.
- Click on more.
- Select export chat.
- Choose "without media" preferably.
- Store the .txt file in your pc.
Now store the whatsapp.py file in the same directory as your chat file. Perform the following before running:
pass the file name 1st person name 2nd person name as cli arguments while running the file .
whatsapp.py 'chat_file_name' 'ken adams' 'regina phelange'
Your json file will be saved in the same directory carring the same name with JSON format .