Python - getting text from html
Question: How to extract text 'ROYAL PYTHON' from this html code in a nice way? I've
been looking for the solution for 4hours and I haven't found anything really
relevant and working.

    
    
    <div class="definicja"><a href="javascript: void(0);"
    onclick="play('/mp3/1/81/c5ebfe33a08f776931d69857169f0442.mp3')"
    class="ikona_sluchaj2"></a> <a href="/slownik/angielsko_polski/,royal+python">ROYAL
    PYTHON</a></div>
    


Answer: As Joel Cornett mentioned, using
[BeautifulSoup](http://www.crummy.com/software/BeautifulSoup/) like this:

    
    
    from bs4 import BeautifulSoup
    
    html = '''<div class="definicja"><a href="javascript: void(0);" onclick="play('/mp3/1/81/c5ebfe33a08f776931d69857169f0442.mp3')" class="ikona_sluchaj2"></a> <a href="/slownik/angielsko_polski/,royal+python">ROYAL PYTHON</a></div>'''
    
    soup = BeautifulSoup(html)
    print soup.getText()
    

