Add "tag" attribute for Element object

This commit is contained in:
Li Yun
2018-07-04 11:20:08 +08:00
parent c59480bf15
commit 116a4b08eb
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -378,6 +378,7 @@ class Element(BaseParser):
def __init__(self, *, element, url: _URL, default_encoding: _DefaultEncoding = None) -> None:
super(Element, self).__init__(element=element, url=url, default_encoding=default_encoding)
self.element = element
self.tag = element.tag
self._attrs = None
def __repr__(self) -> str: