[Solved] How can I extract the text between ? [closed]


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="https://stackoverflow.com/" id="lastfmLogo">Last.fm</a>, <a class="nav-link" href="http://stackoverflow.com/music">Music</a>....

For getting the text of each one of them.

for link in soup('a'):
    print link.get_text()

1

solved How can I extract the text between ? [closed]