I want to parse a website\'s followers count with BeautifulSoup. This is what I have so far:
username_extract = \'lazada_my\'
url = \'https://www.instagram.
Most of the content is dynamically generated with JS. That's the reason you're getting empty results.
But, the followers
count is present in the page source. Only thing is, it is not directly available in the form you want. You can see it here:
If you want to scrape the followers count without regex, you can use this:
>>> followers = soup.find('meta', {'name': 'description'})['content']
>>> followers
'407.4k Followers, 27 Following, 2,740 Posts - See Instagram photos and videos from Lazada Malaysia (@lazada_my)'
>>> followers_count = followers.split('Followers')[0]
>>> followers_count
'407.4k '