This script can find out the most active users in three social networks: VK, Facebook, and Instagram. The searching period on Instagram 90 days, on VK – 14 days, on Facebook 30 days.
-
You have to have Instagram account.
-
Get VK's service key
-
Create FB's application and get access token
Create file .env in the root and write in it:
INST_LOGIN = your Instagram login
INST_PSWRD = your Instagram password
VK_TOKEN=vk's group token
FB_TOKEN=fb's application token
Python3 must be already installed.
Should use virtual env for project isolation.
Then use pip
(or pip3
, if there is a conflict with Python2) to install dependencies:
pip install -r requirements.txt
Run scripts in terminal with correct argument (vk
, instagram
, facebook
)
python customer_search.py facebook
Комментаторы за 30 дней:
{'2582914478431232'}
Реакции пользователей:
{'2582914478431232': {'ANGRY': 2, 'SAD': 2}}
The code is written for educational purposes on online-course for web-developers dvmn.org.