Current Path: > > usr > lib > python2.7 > site-packages > pip > _vendor > > > html5lib > treeadapters
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__init__.py | File | 208 bytes | April 21 2022 18:08:21. | |
__init__.pyc | File | 486 bytes | April 21 2022 18:08:34. | |
__init__.pyo | File | 486 bytes | April 21 2022 18:08:34. | |
genshi.py | File | 1555 bytes | April 21 2022 18:08:21. | |
genshi.pyc | File | 1725 bytes | April 21 2022 18:08:34. | |
genshi.pyo | File | 1725 bytes | April 21 2022 18:08:34. | |
sax.py | File | 1661 bytes | April 21 2022 18:08:21. | |
sax.pyc | File | 1761 bytes | April 21 2022 18:08:34. | |
sax.pyo | File | 1691 bytes | April 21 2022 18:08:35. |
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName, Attrs from genshi.core import START, END, TEXT, COMMENT, DOCTYPE def to_genshi(walker): text = [] for token in walker: type = token["type"] if type in ("Characters", "SpaceCharacters"): text.append(token["data"]) elif text: yield TEXT, "".join(text), (None, -1, -1) text = [] if type in ("StartTag", "EmptyTag"): if token["namespace"]: name = "{%s}%s" % (token["namespace"], token["name"]) else: name = token["name"] attrs = Attrs([(QName("{%s}%s" % attr if attr[0] is not None else attr[1]), value) for attr, value in token["data"].items()]) yield (START, (QName(name), attrs), (None, -1, -1)) if type == "EmptyTag": type = "EndTag" if type == "EndTag": if token["namespace"]: name = "{%s}%s" % (token["namespace"], token["name"]) else: name = token["name"] yield END, QName(name), (None, -1, -1) elif type == "Comment": yield COMMENT, token["data"], (None, -1, -1) elif type == "Doctype": yield DOCTYPE, (token["name"], token["publicId"], token["systemId"]), (None, -1, -1) else: pass # FIXME: What to do? if text: yield TEXT, "".join(text), (None, -1, -1)
SILENT KILLER Tool