title: Parsing stock recommended rating from Yahoo stock site
body: <p>I'm looking to parse a specific Yahoo stock page using a Python script (take <a href="https://finance.yahoo.com/quote/NOA?ltr=1" rel="nofollow noreferrer">https://finance.yahoo.com/quote/NOA?ltr=1</a> for example) and print the "Recommended Rating" to a file. Recommended rating can be found on the right hand side of the page about half way down.</p>
  
  <p>This is what I have so far</p>
  
  <pre><code>  try:
      import urllib.request as urllib2
  except ImportError:
      import urllib2
  from bs4 import BeautifulSoup
  quote_page = 'https://finance.yahoo.com/quote/NOA?ltr=1'
  page = urllib2.urlopen(quote_page)
  soup = BeautifulSoup(page, "html.parser")
  name_box = soup.find(attrs={'div': 'rating-text Arrow South Fw(b) Bgc($strongBuy) Bdtc($strongBuy)'})
  name = name_box.text.strip()
  print(name)
  </code></pre>
  
  <p>The tricky part is that I believe the recommended rating is only listed on the page as InnerHTML. I'm  not sure how i'd go about retrieving this data, a push in the right direction would be greatly appreciated!</p>