File "html5parser.cpython-38.opt-1.pyc"
Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/usr/lib/python3.8/site-packages/pip/_vendor/html5lib/__pycache__/html5parser.cpython-38.opt-1.pyc
File size: 92.15 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit
U
.e @ s d dl mZmZmZ d dlmZmZ d dlZd dlm Z ddl
mZ ddl
mZ ddl
m
Z
dd lmZ dd
l
mZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z" d!ddZ#d"ddZ$dd Z%G dd de&Z'ej(dd Z)dd Z*d#ddZ+G dd d e,Z-dS )$ )absolute_importdivisionunicode_literals)with_metaclassviewkeysN)OrderedDict )_inputstream)
_tokenizer)treebuilders)Marker)_utils)spaceCharactersasciiUpper2LowerspecialElementsheadingElements
cdataElementsrcdataElements
tokenTypes
tagTokenTypes
namespaceshtmlIntegrationPointElements"mathmlTextIntegrationPointElementsadjustForeignAttributesadjustMathMLAttributesadjustSVGAttributesE_ReparseExceptionetreeTc K s$ t |}t||d}|j| f|S )a Parse an HTML document as a string or file-like object into a tree
:arg doc: the document to parse as a string or file-like object
:arg treebuilder: the treebuilder to use when parsing
:arg namespaceHTMLElements: whether or not to namespace HTML elements
:returns: parsed tree
Example:
>>> from html5lib.html5parser import parse
>>> parse('<html><body><p>This is a doc</p></body></html>')
<Element u'{http://www.w3.org/1999/xhtml}html' at 0x7feac4909db0>
namespaceHTMLElements)r getTreeBuilder
HTMLParserparse)doctreebuilderr kwargstbp r) D/usr/lib/python3.8/site-packages/pip/_vendor/html5lib/html5parser.pyr# s
r# divc K s, t |}t||d}|j| fd|i|S )a# Parse an HTML fragment as a string or file-like object into a tree
:arg doc: the fragment to parse as a string or file-like object
:arg container: the container context to parse the fragment in
:arg treebuilder: the treebuilder to use when parsing
:arg namespaceHTMLElements: whether or not to namespace HTML elements
:returns: parsed tree
Example:
>>> from html5lib.html5libparser import parseFragment
>>> parseFragment('<b>this is a fragment</b>')
<Element u'DOCUMENT_FRAGMENT' at 0x7feac484b090>
r container)r r! r"