title: Web Scraping :- "" TypeError: 'NoneType' object is not subscriptable "". How to fix this issue?
body: <p>I have tried to fix this error but I can't.</p>
  <p>I am trying to scrape a website and here is how it looks:</p>
  <p>the variable str1 contain the web address of the website in the form of string.</p>
  <pre class="lang-py prettyprint-override"><code>my_url = str1
  uClient = uReq(my_url)
  page_html = uClient.read()
  uClient.close()
  page_soup = soup(page_html, &quot;html.parser&quot;)
  
  data = page_soup.findAll(&quot;div&quot;, {&quot;class&quot;: &quot;_2kHMtA&quot;})
  </code></pre>
  <p>And at last I tried to print this statement:</p>
  <pre class="lang-py prettyprint-override"><code>y = data[2].div.img['alt']
  print(y)
  </code></pre>
  <p>When I print this statement it always tries to show that error !
  Please Help.</p>