wiggin15 / whatsapp_history

Get full chat history from Whatsapp and SMS/iMessage
31 stars 21 forks source link

Numbers to Name bug #3

Open riyadshauk opened 9 years ago

riyadshauk commented 9 years ago

Very awesome tool! This doesn't work with multiple whatsapp phone numbers associated with one contact name. It worked when I went back and changed the name of the person in my contacts associated with that person's phone number for the specific conversation I wanted to transfer, which was buggy and unexpected, but still awesome.

wiggin15 commented 9 years ago

Hi. Thanks for trying it out.

Just to make sure I understand right: you have a contact with two different phone numbers, and each phone number has a different Whatsapp account, so you have two different conversations with the same contact? It happens with Whatsapp, not SMS?

Does it show an error, or just output only one of the conversations instead of both?

riyadshauk commented 9 years ago

Yes, that's correct. I have exactly two different conversations with the same contact (though, I imagine the specific number, two, is irrelevant to the fact that I have multiple numbers associated with one contact; rather than having a one-to-one injective relationship, it is many-to-one). They both, then, have the same conversation name (well, until I made a new 'contact' for this person's other number on my phone -- which is not what how I want to keep it saved on my phone -- subsequently re-backed up my phone with iTunes, and reran your Python script... to be exact).

It gave me an error on the SMS part, though I didn't care about the SMS functionality (looking back at the SMS output, it looks like it stopped short as I don't see a number of my SMS conversations there). As for the Whatsapp conversations, it worked, but it only transferred one of the conversations from that contact (which happened to be the shorter one -- or perhaps it may have overwritten the html file?), and it did, in fact, transfer all the media associated with the conversation that was not apparent as a file outputted (along with seemingly the media for the other conversations on my whatsapp app)...

If this isn't enough information, I would assume it's easy to see an idea of how things are working by looking at your code and extrapolating from there (which I don't really have much time to do right now, nor would I be as good at you at understanding all the stuff you've done to make your awesome tool).

wiggin15 commented 9 years ago

Can you please paste the error you get with the SMS part? I'll try to fix both.

riyadshauk commented 9 years ago

$ $ python iphone_history.py WARNING: Could not find date of backup from /Users/$USER/Library/Application Support/MobileSync/Backup/5aed4ff684ad8d359af34047c3884424a471d8bd-20150201-231213. Assigning oldest date WARNING: Could not find date of backup from /Users/$USER/Library/Application Support/MobileSync/Backup/5aed4ff684ad8d359af34047c3884424a471d8bd-20150207-024137. Assigning oldest date WARNING: No Info.plist in backup /Users/$USER/Library/Application Support/MobileSync/Backup/Tenorshare_a0551f763914a093329e3a161488d9a1e855711c. Assigning oldest date WhatsApp [##########] 100.0% done Traceback (most recent call last): File "iphone_history.py", line 97, in main() File "iphone_history.py", line 94, in main lib_main(backup_extractor, lib) File "iphone_history.py", line 85, in lib_main lib.main(backup_extractor) File "/Users/$USER/Downloads/whatsapp_history-master/sms.py", line 115, in main output_contact(conn, contact_conn, backup_extractor, chat_id[0], "me") File "/Users/$USER/Downloads/whatsapp_history-master/sms.py", line 100, in output_contact mfrom = your_name if is_from_me else get_contact_name(conn, contact_conn, handle_id) File "/Users/$USER/Downloads/whatsapp_history-master/sms.py", line 27, in get_contact_name handle_id = next(c)[0] # this is either a phone number or an iMessage address StopIteration $

wiggin15 commented 9 years ago

This should work now. Do you mind giving the latest code a try? Thanks

vslbsl commented 9 years ago

Hello, that's a great tool, thank you for you time to do it. Do you have any plans to do same tool but grab all info through web.whatsapp.com . This scenario will be very helpful for everyone who have encrypted backup on itunes, additionally if they do not remember the passcode of this backup.