That re doesn't look for empty text, it looks for text that starts with zero or more spaces (that is, all strings ever).

Do `el.text.strip() == ''` instead.  (Keep the el.text is None, obviously.)