Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import requests
  2. from bs4 import BeautifulSoup
  3.  
  4. url = http://financials.morningstar.com/ratios/r.html?t=AAPL&region=usa&culture=en-US
  5.  
  6. response = requests.get(url)
  7. soup_key_ratios = bs(response.content, 'html5lib')
  8. financial_tables = soup_key_ratios.find("div", {"id":"financeWrap"})
  9. print financial_tables
  10.  
  11. # Output: <div id="financeWrap">
  12. # </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement