Welcome folks today in this blog post we will be scraping instagram users
followers and following usernames and posts and analyzing them using pandas
library in python. All the full source code of the application is shown below
Get Started
In order to get started you need to install the following libraries using the pip
command as shown below
pip install pandas
pip install instagramy
After installing this library you can make an app.py
file and copy paste the following code
app.py
1 2 3 4 5 6 7 8 9 10 |
import pandas as pd from instagramy.plugins.analysis import analyze_users_popularity session_id = "38566737751%3Ah7JpgePGAoLxJe%334" teams = ["chennaiipl", "mumbaiindians", "royalchallengersbangalore", "kkriders", "delhicapitals", "sunrisershyd"] data = analyze_users_popularity(teams, session_id) print(pd.DataFrame(data)) |
Now if you execute the above script
by typing the below command
python app.py