Chatistics icon indicating copy to clipboard operation
Chatistics copied to clipboard

search messenger directory one level more

Open coopwilliams opened this issue 6 years ago • 2 comments

This fixes the problem that messenger.py could not locate .JSON files in Facebook files exported as recently as 11/05/2019. If one copies the contents of the exported 'messages' folder into 'rawdata/messenger', the files therein are one level too deep to be found. I think Facebook's export style must have changed.

This commit adds one more layer to the search for files, and the messenger parser now finds the .json files that it was missing before.

Example directory structure for reference: 'Chatistics/raw_data/messenger/inbox/usernamehere/message_1.json'

coopwilliams avatar Jan 17 '20 05:01 coopwilliams

I would prefer to use

glob.glob(os.path.join(file_path, '**', '*.json') recursive=True)

This is supported after Python 3.5+.

mar-muel avatar Jan 23 '20 09:01 mar-muel

I'm not sure we should import filtered_threads/ and message_requests/, which are spam, by default. They'll contain dangerous links and lewd language.

I'd prefer to import directly inbox/, and potentially also archived_threads/.

MasterScrat avatar Jan 23 '20 10:01 MasterScrat