I needed to to get the text of a specific div elemnt in an html file. I tried to use python's standard library modules for markup processing such as htmllib etc. but I couldn't figure how to use them. I've created my own module just for getting the text from an html element:
Note the code does not check if the html code is correct. it also work only for the body part, and ignore img tags.