Skip to content

wiki.py Issue with empty <p> tags #7

@oleg-sh

Description

@oleg-sh

If a page has something like:

    <p><br />
    </p>

the code

msg = ''.join(soup.p.findAll(text=True))

returns an empty string.
To avoid this you can use:

    for para in soup.findAll('p'):
        if not para.text == "":
            msg = msg + para.text

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions