Python 如何提取<;之间的文本;a></a>;?

Python 如何提取<;之间的文本;a></a>;?,python,tags,beautifulsoup,Python,Tags,Beautifulsoup,我用的是漂亮的汤,但不知道怎么做 </td> <td class="playbuttonCell"> <a class="playbutton preview-track" href="/music/example" data-analytics-redirect="false" ><img class="transparent_png play_icon" width="13" height="13" alt="Pla

我用的是漂亮的汤,但不知道怎么做

</td>
        <td class="playbuttonCell">
        <a class="playbutton preview-track" href="/music/example" data-analytics-redirect="false"  ><img class="transparent_png play_icon" width="13" height="13" alt="Play" src="http://cdn.last.fm/flatness/preview/play_indicator.png" style="" /></a>    </td>
                                                        <td class="subjectCell" title="example, played 3 times">
            <div>
                                        <a href="/music/example"   >here lies the text i need</a>

打印所有内容,我还可以尝试什么?

让我们看看您使用beautifulsoupfrom urlib导入urlopen从bs4导入BeautifulSoup导入re-webpage=urlopen尝试了什么(“那我就不知道还能做什么了。@muchacho:这不符合使用beautifulsou的条件。好吧,老实说,我不知道我在做什么。问题是,页面上有数百个这样的字符串。我该如何继续?
import urllib
from bs4 import BeautifulSoup

html = urllib.urlopen('http://www.last.fm/user/Jehl/charts?rangetype=overall&subtype=artists').read()
soup = BeautifulSoup(html)
print soup('a')
# prints [<a href="/" id="lastfmLogo">Last.fm</a>, <a class="nav-link" href="/music">Music</a>....
import urllib
from bs4 import BeautifulSoup

html = urllib.urlopen('http://www.last.fm/user/Jehl/charts?rangetype=overall&subtype=artists').read()
soup = BeautifulSoup(html)
print soup('a')
# prints [<a href="/" id="lastfmLogo">Last.fm</a>, <a class="nav-link" href="/music">Music</a>....
for link in soup('a'):
    print link.get_text()