title: want to retrieve stock company name from yahoo finance by using BeautifulSoup
body: <p>I am trying to use BeautifulSoup to scrap the stock company names, however the result "IndexError: list index out of range" appears. </p>
  
  <p>Belows are my codes</p>
  
  <pre><code>from bs4 import BeautifulSoup
  list = ['BABA', 'APPL']
  stockname = []
  for i in range(len(list)):
        stock_company = "https://finance.yahoo.com/quote/"+list[i]
        soup = BeautifulSoup(requests.get(stock_company).text,"html.parser").select('h1')[0].text.strip()[10:]
        stockname.append(soup)                                         
  stockname
  </code></pre>