Skip to content

Make a graph network of your followers. Based on username and gender

Notifications You must be signed in to change notification settings

instautils/spider

Repository files navigation

🕷️ Spider

Make a graph network of your followers.


Neo4j Graph Database

Neo4j is the most popular graph database according to DB-Engines ranking, and the 22ⁿᵈ most popular database overall.

$ docker-compose up

Dependencies

$ sudo pip install -r requirements.txt

Start spider.py

$ export INSTAGRAM_NEO4J='' 
$ export INSTAGRAM_USERNAME='' 
$ export INSTAGRAM_PASSWORD='' 
$ python spider.py # running with python 2

NEO4J Example Queries

MATCH (a:Person {gender: 'female'})-[:FOLLOW]->(b:Person) 
WITH a, count(b) as c 
WHERE c > 2 
RETURN a
MATCH (a:Person {gender: 'female'})-[:FOLLOW]->(b:Person) 
WITH a, collect(b) as collection, count(b) as c 
WHERE c > 2
RETURN a, collection
MATCH (me:Person {name: "aidenzibaei"}), (a:Person {gender: 'female'})-[:FOLLOW]->(b:Person) 
MATCH path = allShortestPaths((me)-[*..6]-(a))
WITH a, count(b) as c, path 
WHERE c > 3 RETURN a, path