mcccc
mcccc

Reputation: 13

Using requests to check instagram pages followers follower count

The title sounds a bit confusing but I am trying to get the follower count of all of the followers of an instagram page. So an example output would be

John  17  followers 
adam  120 followers
will  172 followers  

This is what I have so far but after this point I am not sure how to pull that data with what requests is giving me. This is because I am not seeing the actual follower data coming in. Any help would be appreciated.

import requests
username = "nfl"
url = 'https://www.instagram.com/' + username
r = requests.get(url).text

Upvotes: 0

Views: 1414

Answers (1)

Msv
Msv

Reputation: 1371

It is a bad idea to use requests module to scrape content from html website. You can use beautifulsoup or scrapy module to scrape content from websites.

You can also Instaloader library provides a convenient way to login and then programmatically access a profile's followers and followings list.

Ref: Use instaloader to get followers

Upvotes: 0

Related Questions