'element.contents' -> 'element.children' for consistency

This commit is contained in:
jesopo 2019-10-31 15:18:45 +00:00
parent 5d08a496a4
commit 8831724af0

View file

@ -72,7 +72,7 @@ def _normalise_note(content):
out = "" out = ""
if type(element) == bs4.element.Tag: if type(element) == bs4.element.Tag:
if element.name == "p": if element.name == "p":
for subitem in element.contents: for subitem in element.children:
if type(subitem) == bs4.element.Tag: if type(subitem) == bs4.element.Tag:
if subitem.name == "br": if subitem.name == "br":
lines.append(out) lines.append(out)