nickysemenza / message-analyzer

πŸ’¬ πŸ“Š Facebook Messenger history scraper + analyzer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Facebook Messenger Analyzer

Download, Parse, and Analyze

This project consists of a few parts / 'modules'

  • Scraper (node.js) that downloads facebook messages into MySQL
  • Analyzer (node) that does data processing, storing intermediary values in redis
  • Web (React.js) that displays data nicely

The Scraper code can work on its own if desired.

##Howto run the scraper

  • Node & Yarn
  • MySQL, with utf8mb4 support
  • Redis
  1. clone, cd into project repo, yarn install
  2. cp .env.example .env, add your own credentials for Facebook and MySQL
  3. node auth.js to auth with facebook and save the state in appstate.json (only need to do this once until the cookies expire)
  4. Scroll down to the end of scraper.js and run your code from within login method!

#TODO

  • make script automatically download all your threads in a loop
  • add support for other metadata (changing emoji/color/title) -requires tweaking facebook-chat-api
  • stop downloading a thread when there are back to back sql duplicate errors, this can be a hacky way of getting a delta update of a thread since the last time we downloaded it
  • chat titles for 1:1 convos are blank, so maybe have a script hint them based on fbid->name lookup and update that title value for 1:1 threads

About

πŸ’¬ πŸ“Š Facebook Messenger history scraper + analyzer

License:MIT License


Languages

Language:JavaScript 85.3%Language:Python 12.0%Language:HTML 1.8%Language:CSS 0.8%