Utility functions

These helper functions are intended to support everyday tasks of data scraping, such as string sanitization, and validation.


Collapse all consecutive whitespace, newlines and tabs in a string into single whitespaces, and strip the outer whitespace. This will also accept an lxml element and extract all text.