Python 使用漂亮的soup解析表行

Python 使用漂亮的soup解析表行,python,parsing,beautifulsoup,Python,Parsing,Beautifulsoup,我试图解析这个html,得到53.1和41.7的值。我不太清楚怎么做 我一直想用漂亮的汤来做 如有任何建议或想法,将不胜感激。谢谢 -或- 请注意.find_all()方法。尝试探索beautifulsoup的所有辅助方法。祝你好运。请以文本而不是图像的形式发布代码。 from bs4 import BeautifulSoup import urllib r = urllib.urlopen('url/to/open').read() soup = BeautifulSoup(r) print

我试图解析这个html,得到53.1和41.7的值。我不太清楚怎么做

我一直想用漂亮的汤来做

如有任何建议或想法,将不胜感激。谢谢

-或-


请注意.find_all()方法。尝试探索beautifulsoup的所有辅助方法。祝你好运。

请以文本而不是图像的形式发布代码。
from bs4 import BeautifulSoup
import urllib
r = urllib.urlopen('url/to/open').read()
soup = BeautifulSoup(r)
print type(soup)
from bs4 import BeautifulSoup
import requests
url = raw_input("Enter a website to extract the URL's from: ")
r  = requests.get("http://" +url)
data = r.text
soup = BeautifulSoup(data)
for link in soup.find_all('a'):
    print(link.get('href'))