Skip to main content

A Whatsapp database parser that will give you the history of your Whatsapp conversations in HTML and JSON.

Project description

Whatsapp-Chat-Exporter

An Android and iPhone Whatsapp database parser that will give you the history of your Whatsapp conversations in HTML and JSON.
If you plan to uninstall WhatsApp or delete your WhatsApp account, please make a backup of your WhatsApp database. You may want to use this exporter again on the same database in the future as the exporter develops

Usage

If you want to use the old release (< 0.5) of the exporter, please follow the old usage guide

First, install the exporter by:

pip install whatsapp-chat-exporter

Then, create a working directory in somewhere you want

mkdir working_wts
cd working_wts

Working with Android

Extract the WhatsApp database with whatever means, one possible means is to use the WhatsApp-Key-DB-Extractor

After you obtain your WhatsApp databse, copy the WhatsApp database and media folder to the working directory. The database is called msgstore.db. If you also want the name of your contacts, get the contact database, which is called wa.db. And copy the WhatsApp (Media) directory from your phone directly.

And now, you should have something like this in the working directory.

Android folder structure

Extracting

Simply invoke the following command from shell, remember to replace the username and device id correspondingly in the command.

wtsexporter -a

Working with iPhone

Do an iPhone Backup with iTunes first.

Encrypted iPhone Backup

If you are working on unencrypted iPhone backup, skip this

If you want to work on an encrypted iPhone Backup, you should install iphone_backup_decrypt from KnugiHK/iphone_backup_decrypt before you run the extract_iphone_media.py.

pip install biplist pycryptodome & :: Optional, since the pip will install these dependencies automatically.
pip install git+https://github.com/KnugiHK/iphone_backup_decrypt

Extracting

Simply invoke the following command from shell, remember to replace the username and device id correspondingly in the command.

wtsexporter -i -b "C:\Users\[Username]\AppData\Roaming\Apple Computer\MobileSync\Backup\[device id]"

Results

After extracting, you will get these:

Private Message

Private Message

Group Message

Group Message

More options

Invoke the wtsexporter with --help option will show you all options available.

> wtsexporter --help
Usage: wtsexporter [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -a, --android         Define the target as Android
  -i, --iphone          Define the target as iPhone
  -w WA, --wa=WA        Path to contact database
  -m MEDIA, --media=MEDIA
                        Path to WhatsApp media folder
  -b BACKUP, --backup=BACKUP
                        Path to iPhone backup
  -o OUTPUT, --output=OUTPUT
                        Output to specific directory
  -j, --json            Save the result to a single JSON file
  -d DB, --db=DB        Path to database file

To do

  1. Convert \r\n to <br>
  2. Reply in iPhone
  3. The CSS for metadata (e.g. {Message Deleted})

Copyright

This is a MIT licensed project.

The Telegram Desktop's export is the reference for whatsapp.html in this repo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

whatsapp-chat-exporter-0.6.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whatsapp_chat_exporter-0.6-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file whatsapp-chat-exporter-0.6.tar.gz.

File metadata

  • Download URL: whatsapp-chat-exporter-0.6.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for whatsapp-chat-exporter-0.6.tar.gz
Algorithm Hash digest
SHA256 5e625aceab4d27b18a4ee6fde6987bbcf4308d06725825ca38d3978ee2d070a8
MD5 d1937501bade5a6eb3cdb484d464392e
BLAKE2b-256 3f7afd5281b82e6ec321fc3d674bd83e055053e39d40fcc8d87dcf7b8cd4fbc3

See more details on using hashes here.

File details

Details for the file whatsapp_chat_exporter-0.6-py3-none-any.whl.

File metadata

  • Download URL: whatsapp_chat_exporter-0.6-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for whatsapp_chat_exporter-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 98dc17dfd3f29c30303c5ebfd0580a75f14b58f730bf33d57e580cf54ae96d84
MD5 65c1caa54ce5bd509ef1b6c4ce50e180
BLAKE2b-256 97fb0bda1b00a4df7713c80b803e52725dbca9d2f88d99d60caa43adec4eff65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page