Python library for parsing through facebook messenger data
Project description
zucked: analyze your Facebook Messenger data
What is it?
zucked is a quick and easy way to veiw your facebook messenger data.
Main Features
- Easy viewing of your most used words on Facebook Messenger
- See another facebook users most sent words to you
- Check the amount of messages you have sent a person or group
- Search a word or phrase that might have sent or recieved to see the message the word or phrase was in as well as who sent it and when
Install
The source code is currently hosted on GitHub at: https://github.com/Jordan-Milne/zucked
latest released version are available at the Python package index (PyPI)
pip install zucked
Tutorial
-
Downlaod your Facebook Messenger data
- When choosing file type make sure it is JSON and not HTML
-
Create a python file in the same directory as the "inbox" folder from your download - not inside the inbox folder
Import
To import zucked, type:
import zucked as zd
read_messages
save read_messages
as a variable, which we will be calling methods on later.
Example:
ms = zd.read_messages
top_words()
call top_words(facebook_name)
on ms
to return an ordered list of the most common words the user sent and how many times they sent it:
Example:
ms.top_words('Jordan Milne')
Returns:
[('I', 3), ('love', 2), ('data', 1)]
If you want stop words filtered out, (what are stop words) then the method would simply be:
ms.top_words('Jordan Milne', stop_words=False)
This method works for top words you have sent and top words you have recieved from a certain user
top_convos
call top_convos(facebook_name)
on ms
to return an ordered list of the name(s) of the person or group and the amount of messages you sent to that person or group:
Example:
ms.top_convos('Jordan Milne')
Returns:
[('User 1', 33),
('User 2', 21)]
search_messages()
call search_messages(facebook_name, value)
on ms
to return a list that has the full message containing the word or phrase input as value
, who the message was sent to, and the date and time the message was sent.
Example:
ms.search_messages('Jordan Milne', 'hello')
Returns:
[{'Message': 'I'm sorry but, hello world',
'Sent to': 'Auston Matthews',
'Date': '2019-06-09 11:46:54'}]
This method works for messages you have sent and messages you have recieved from a certain user
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.