Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Now to make this work for Whatsapp for the brits... Got excited at the idea of a project and then realised I will have to learn Rust if I was to fork this haha.

Anyway, this is definitely a cool idea. Reading my chat history with friends is actually very nostalgic.



This Python package exports WhatsApp backup chat to JSON or HTML:

https://github.com/KnugiHK/WhatsApp-Chat-Exporter

It also links to a Telegram exporter.


> It also links to a Telegram exporter.

Telegram has this natively already


Indeed! That was unexpected for me.


WhatsApp lets you export chats as txt, but I guess that's lossy.. e.g. I'm not sure the emojis will be there. Surely no attachments or voice messages.

As for extracting from the backup DB, they'll be encrypted..


Whatsapp on Android lets you export a chat with or without media (images etc), but it limits the number of messages. With media you get the last 10k messgaes, and without you get the last 40k. Emojis are preserved though.

See https://faq.whatsapp.com/1180414079177245/?cms_platform=andr...

The limits are supposedly due to email size limits but, as they also apply when exporting to non-email endpoints like Google Drive, I suspect they're more to do with preventing people from moving their chats to other services.

And yes, the db is encrypted.


I wonder if those limits will be eased with the new EU regulations…


GDPR is already 6 years old.


> they'll be encrypted

Since some months (years?) ago, WhatsApp lets you set up your own encryption password for the DB backup. I set one up and used https://github.com/ElDavoo/wa-crypt-tools to get access to the decrypted SQLite and run some analytics over my messages :)


For the rest of the world…


I was going to say that but I then remembered all the many many other apps that a lot of other countries used, and therefore I didn't want to act like I wasn't aware of those. For example, WeChat, Line, KakaoTalk, and more. Whatsapp is not at all universal, even if it might be the most common in many European countries.


There is a python library for Wechat, but I'm having problems using it. Also, 1) getting and then 2) decrypting the Wechat database isn't easy. Because my phone is not rooted, I had to use an android emulator on my PC, transfer all my chats over there, extract the DB and all media. After installing all the fickle dependencies of the bruteforce decrypter, it took three days straight on my laptop from 2014 to decrypt, and now I can finally open it in an SQLite viewer. But that still leaves the major step of getting formatted messages out of there like in the OP. The HTML-conversion script that I used produced half-decent results, but hasn't been maintained for a while and thus chokes on certain messages so that the conversion of large chats invariably breaks down before being finished. Anyway. Maybe it is time to learn Python...


This desperately needs to happen — in a way that all messages and media can be exported in a sensibly reviewable format. Heck, I'd just like to be able to archive a backup that I know can be restored in the future on another device.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: