mirror of
https://github.com/taroved/pol
synced 2025-05-21 08:30:24 -07:00
attributes
This commit is contained in:
parent
e02f4f0d1b
commit
6db89fcbe1
@ -47,7 +47,7 @@ class Downloader(object):
|
|||||||
def html2json(self, el):
|
def html2json(self, el):
|
||||||
return [
|
return [
|
||||||
el.tag,
|
el.tag,
|
||||||
{"tag-id": el.attrib["tag-id"]},
|
{k: v for (k,v) in el.items()}, # attributes
|
||||||
[self.html2json(e) for e in el.getchildren() if isinstance(e, etree.ElementBase)]
|
[self.html2json(e) for e in el.getchildren() if isinstance(e, etree.ElementBase)]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user