This project creates a network graph of connections out of your WhatsApp groups' participants data.
Make sure you have installed all of the following prerequisites on your machine:
- Node.js - Download & Install Node.js and the npm package manager.
- python 3.7+ (may work on older versions)
- Clone this project
$ git clone https://github.com/OfirKP/Whatsapp-Net
- In the application directory (
$ cd Whatsapp-Net
), run this command:
$ npm install
- Install required python packages either by using
requirements.txt
:
$ pip install -r requirements.txt
or by installing them directly:
$ pip install networkx==2.5 tqdm==4.50.2 matplotlib==3.1.1
To generate a json file with your groups' data, run the following command:
$ node scrape.js
A browser window should open. If you're not connected to WhatsApp web, connect by scanning QR code.
Wait until json file starts downloading.
Then, run the python script:
$ python generate_graph.py <data1.json> <data2.json> ...
Optional arguments:
-c
,--contacts
: paths to contacts (.json) files, so that the first file overrides names of identical contacts in other files-o
,--output
: path to output GEXF file (default isgraph.gexf
)-h
,--help
: help message to get more info about the usage of the script
RECOMMENDED: use a software like Gephi that allows graph visualization, taking GEXF files as input.
This project is licensed under the GNU General Public License v2.0 . See License for more info.