html2text

 html2text  is a codebase that converts HTML to markdown formatted text. Originally by Aaron Swartz, it is now part of pypi and a fork is maintained.