My intention is to get the count of no of followers on Instagram.
I see that we don’t have a request module to request and use re to get the count. but as we have urllib is it possible to get the number of followers using it.
Like this below
import requests
import re
user = “espn”
url = ‘https://www.instagram.com/’ + user
r = requests.get(url).text
followers = re.search(’“edge_followed_by”:{“count”:([0-9]+)}’,r).group(1)
return followers