Python beautifulsoup如何在';href';

Python beautifulsoup如何在';href';,python,beautifulsoup,Python,Beautifulsoup,我有一段html: <a href="http://francetv.fr/videos/alcaline_l_instant_,12163184.html" class="ss-titre"> "Paris Combo" </a> <a href="http://francetv.fr/videos/jt20h_,12185324.html" class=

我有一段html:

<a href="http://francetv.fr/videos/alcaline_l_instant_,12163184.html"  class="ss-titre">
                                "Paris Combo"                   </a>    
<a href="http://francetv.fr/videos/jt20h_,12185324.html" class="ss-titre"> 
                            Journal         </a>
我该怎么办?
谢谢

您需要致电
查找所有(“a”)

>>> for line in soup.find_all("a"):
...     print(line.text.strip())
"Paris Combo"
Journal

到目前为止你尝试了什么?我已经编辑了我的问题是的,这意味着你使用的是以前版本的BeautifulSoup。如果你可以,你应该考虑升级到4OK版本,因为我正在使用Python 2.7和GTK2…也许我会学蟒蛇3。。。很快!Beautifulsoup4也适用于Python 2.7。它速度更快,内存占用也更好。啊,好的!在Ubuntu中,包是“python-bs4”,而不是“PythonBeautifulSoup”(v3)。谢谢你这么精确
>>> for line in soup.find_all("a"):
...     print(line.text.strip())
"Paris Combo"
Journal