diff --git a/AdvancedHTMLParser/Parser.py b/AdvancedHTMLParser/Parser.py index a8fd204..d322345 100755 --- a/AdvancedHTMLParser/Parser.py +++ b/AdvancedHTMLParser/Parser.py @@ -296,7 +296,7 @@ def getElementsByAttr(self, attrName, attrValue, root='root'): elements = [] - if isFromRoot is True and root.get(attrName) == attrValue: + if isFromRoot is True and root.getAttribute(attrName) == attrValue: elements.append(root) for child in root.children: