Use the lxml method text_content to extract text from HTML to be sure that text rendering is empty or not, this way, any kind of given HTML is correctly considered
Use the lxml method text_content to extract text from HTML to be sure that text rendering is empty or not, this way, any kind of given HTML is correctly considered