https://github.com/swedishmike/twitter_dm_parser
A Jupyter Notebook that helps you import and parse DM's from a Twitter backup
https://github.com/swedishmike/twitter_dm_parser
jupyter-notebook osint osint-python python twitter
Last synced: about 2 months ago
JSON representation
A Jupyter Notebook that helps you import and parse DM's from a Twitter backup
- Host: GitHub
- URL: https://github.com/swedishmike/twitter_dm_parser
- Owner: swedishmike
- License: gpl-3.0
- Created: 2019-11-20T09:59:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-20T16:05:00.000Z (over 5 years ago)
- Last Synced: 2025-05-08T23:16:37.846Z (about 2 months ago)
- Topics: jupyter-notebook, osint, osint-python, python, twitter
- Language: Jupyter Notebook
- Size: 22.5 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitter DM Parser
### Background
For, _ahem_, a specific reason I found myself wanting/needing to be able to import DM data from a Twitter backup.The file format was a bit weird, it looked a bit like Json but it wouldn't import straight in like that.
First I tried to ask for help on [Twitter](https://twitter.com/swedishmike/status/1196750124636147712) but that didn't really work out so I went Googling...
I found the following [blog](http://www.farleyforensics.com/2018/10/01/twitter-archive-parser-analysis/) which lead me the the accompanying [GitHub Repo](https://github.com/jfarley248/Twitter-Archive-Parser).
The code was for Python 2 and I also wanted to get this into a Pandas dataframe for further analysis and data wrangling so I happily stole the code and changed it to suit my needs. Another decision I made was to move it into a Jupyter Notebook in order to be able to play with data on the fly a bit easier.
Big thanks to [Jack Farley](https://twitter.com/jackfarley248) for the original idea and code!
### What does it do?
Not much really. But what it does do it seems to do fairly well.It will parse the **direct-message.js** and **direct-message-group.js** files from a Twitter backup. The end product(s) you'll end up with are the combined data in a Pandas dataframe as well as in a exported csv file.
It also will try and match the Twitter ID's to the correct account name.
The location of the archive files as well as the name and location of the exported csv file are defined as variables in the Notebook so you can customise that fairly easily.
### Feedback
If you have any feedback/bugs/improvements etc - open an Issue here on Github or submit a pull request. As we all know: _Sharing is caring!_