I'm using this answer to clean an HTML file.
Remove all javascript tags and style tags from html with python and the lxml module
It does a great job of removing all the html, script, and style tags, however if the text doesn't have a space in it the cleaner doesn't add one. This is a problem for things like menus that don't have spaces so it comes out as all one word because they all run together.
Any ideas on how to prevent this, add the spaces, or whatever? Thanks