Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<img src> fails assert #402

Open
mooffie opened this issue Sep 18, 2023 · 0 comments
Open

<img src> fails assert #402

mooffie opened this issue Sep 18, 2023 · 0 comments

Comments

@mooffie
Copy link

mooffie commented Sep 18, 2023

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
  • html2text version: 2020.1.16
  • Python version: 3.11.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant