v/pol
1
0
mirror of https://github.com/taroved/pol synced 2025-05-27 19:40:09 -07:00

stat attrs

This commit is contained in:
Alexandr Nesterenko 2018-02-12 15:26:56 +03:00
parent d90386117b
commit f601c0d5f8

View File

@ -55,7 +55,7 @@ class Downloader(object):
def html2json(self, el):
return [
el.tag,
{k: v for (k,v) in el.items()}, # attributes
{k: v for (k,v) in el.items() if k in ['tag-id', 'class']}, # attributes
[self.html2json(e) for e in el.getchildren() if isinstance(e, etree.ElementBase)]
]