title: AttributeError: 'NoneType' object has no attribute 'attrs', tried try-except method
body: <p>Trying to fetch Instagram account details.
  Tried using <code>try/except</code>, but the problem persists.</p>
  <pre><code>from bs4 import BeautifulSoup
  import requests
  
  URL = 'https://www.instagram.com/{}/'
  def scrap_data(user_name):
      data = requests.get(URL.format(user_name))
      soup = BeautifulSoup(data.text, 'html.parser')
      meta = soup.find('meta', property='og:description')
      s = meta.attrs['Content']
      s = s.split('_')[0]
      print(s)
  if __name__ == '__main__':
      user_name = input(&quot;Enter instagram username:&quot;)
      scrap_data(user_name)
  </code></pre>