title: unreasonable error while scraping yahoo finance
body: <p>I'm going to scraping the daily k-value of some stocks at the website &quot;yahoo finance&quot;.</p>
  <p>The code is very simple and it seems nothing unusual, but it still appears error while compiling.
  I don't realize the reasons.</p>
  <p>My code is below</p>
  <pre class="lang-py prettyprint-override"><code>import requests
  
  import bs4
  from bs4 import BeautifulSoup
  
  url='https://tw.screener.finance.yahoo.net/screener/basic.html'
  r=requests.get(url)
  obj=bs4.BeautifulSoup(r.text,'html.parser')
  table=obj.find('div', {'class': 'result_table'}).find_all('span')[1].text
  print(table)
  </code></pre>
  <p><strong>the compiling result is below:</strong></p>
  <pre><code>Traceback (most recent call last):
    File &quot;D:\python2\0228.py&quot;, line 11, in &lt;module&gt;
      table=obj.find('div', {'class': 'result_table'}).find_all('span')[2].text
  AttributeError: 'NoneType' object has no attribute 'find_all'
  </code></pre>