Alir3z4 / html2text

Convert HTML to Markdown-formatted text.
alir3z4.github.io/html2text/
GNU General Public License v3.0
1.74k stars 266 forks source link

<img src> fails assert #402

Open mooffie opened 9 months ago

mooffie commented 9 months ago

The following:

<img src alt="popup-image">

...raises an AssertionError because src exists in the element's attributes yet it's None.

The "problematic" source code:

    if tag == "img" and start and not self.ignore_images:
        if "src" in attrs:
            assert attrs["src"] is not None