File "parser.cpython-36.opt-1.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python36/lib64/python3.6/html/__pycache__/parser.cpython-36.opt-1.pyc
File size: 10.51 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

3

 fAE@sdZddlZddlZddlZddlmZdgZejdZejdZ	ejdZ
ejdZejd	Zejd
Z
ejdZejdZejd
ZejdejZejd
ZejdZGdddejZdS)zA parser for HTML and XHTML.N)unescape
HTMLParserz[&<]z
&[a-zA-Z#]z%&([a-zA-Z][-.a-zA-Z0-9]*)[^a-zA-Z0-9]z)&#(?:[0-9]+|[xX][0-9a-fA-F]+)[^0-9a-fA-F]z	<[a-zA-Z]>z--\s*>z+([a-zA-Z][^\t\n\r\f />\x00]*)(?:\s|/(?!>))*z]((?<=[\'"\s/])[^\s/>][^\s/=>]*)(\s*=+\s*(\'[^\']*\'|"[^"]*"|(?![\'"])[^>\s]*))?(?:\s|/(?!>))*aF
  <[a-zA-Z][^\t\n\r\f />\x00]*       # tag name
  (?:[\s/]*                          # optional whitespace before attribute name
    (?:(?<=['"\s/])[^\s/>][^\s/=>]*  # attribute name
      (?:\s*=+\s*                    # value indicator
        (?:'[^']*'                   # LITA-enclosed value
          |"[^"]*"                   # LIT-enclosed value
          |(?!['"])[^>\s]*           # bare value
         )
         (?:\s*,)*                   # possibly followed by a comma
       )?(?:\s|/(?!>))*
     )*
   )?
  \s*                                # trailing whitespace
z#</\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>c@seZdZdZd:ZddddZdd	Zd
dZdd
ZdZ	ddZ
ddZddZddZ
ddZd;ddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9ZdS)<raEFind tags and other markup and call handler functions.

    Usage:
        p = HTMLParser()
        p.feed(data)
        ...
        p.close()

    Start tags are handled by calling self.handle_starttag() or
    self.handle_startendtag(); end tags by self.handle_endtag().  The
    data between tags is passed from the parser to the derived class
    by calling self.handle_data() with the data as argument (the data
    may be split up in arbitrary chunks).  If convert_charrefs is
    True the character references are converted automatically to the
    corresponding Unicode character (and self.handle_data() is no
    longer split in chunks), otherwise they are passed by calling
    self.handle_entityref() or self.handle_charref() with the string
    containing respectively the named or numeric reference as the
    argument.
    scriptstyleT)convert_charrefscCs||_|jdS)zInitialize and reset this instance.

        If convert_charrefs is True (the default), all character references
        are automatically converted to the corresponding Unicode characters.
        N)rreset)selfrr
0/opt/alt/python36/lib64/python3.6/html/parser.py__init__WszHTMLParser.__init__cCs(d|_d|_t|_d|_tjj|dS)z1Reset this instance.  Loses all unprocessed data.z???N)rawdatalasttaginteresting_normalinteresting
cdata_elem_markupbase
ParserBaser)r	r
r
rr`s
zHTMLParser.resetcCs|j||_|jddS)zFeed data to the parser.

        Call this as often as you want, with as little or as much text
        as you want (may include '\n').
        rN)rgoahead)r	datar
r
rfeedhszHTMLParser.feedcCs|jddS)zHandle any buffered data.N)r)r	r
r
rcloseqszHTMLParser.closeNcCs|jS)z)Return full source of start tag: '<...>'.)_HTMLParser__starttag_text)r	r
r
rget_starttag_textwszHTMLParser.get_starttag_textcCs$|j|_tjd|jtj|_dS)Nz</\s*%s\s*>)lowerrrecompileIr)r	elemr
r
rset_cdata_mode{s
zHTMLParser.set_cdata_modecCst|_d|_dS)N)rrr)r	r
r
rclear_cdata_modeszHTMLParser.clear_cdata_modecCsL|j}d}t|}x||kr|jr||jr||jd|}|dkr|jdt||d}|dkrvtjdj	||rvP|}n(|j
j	||}|r|j}n|jrP|}||kr|jr|jr|jt
|||n|j||||j||}||krP|j}|d|rLtj||r&|j|}	n|d|r>|j|}	nl|d|rV|j|}	nT|d|rn|j|}	n<|d	|r|j|}	n$|d
|kr|jd|d
}	nP|	dkr>|sP|jd|d
}	|	dkr|jd|d
}	|	dkr|d
}	n|	d
7}	|jr,|jr,|jt
|||	n|j|||	|j||	}q|d|rtj||}|r|jd
d}
|j|
|j}	|d|	d
s|	d
}	|j||	}qn:d||dkr|j|||d
|j||d
}Pq|d|rtj||}|rN|jd
}
|j|
|j}	|d|	d
s@|	d
}	|j||	}qtj||}|r|r|j||dkr|j}	|	|kr|}	|j||d
}Pn,|d
|kr|jd|j||d
}nPqqW|r:||kr:|jr:|jr|jr|jt
|||n|j||||j||}||d|_dS)Nr<&"z[\s;]z</z<!--z<?z<!rrz&#;)rlenrrfindrfindmaxrrsearchrstarthandle_datarZ	updatepos
startswithstarttagopenmatchparse_starttagparse_endtag
parse_commentparse_piparse_html_declarationcharrefgrouphandle_charrefend	entityrefhandle_entityref
incomplete)r	r;rinjZampposr2r0knamer
r
rrs












zHTMLParser.goaheadcCs|j}|||ddkr$|j|S|||ddkrB|j|S|||djdkr|jd|d}|d
krvdS|j||d	||dS|j|SdS)Nz<!--z<![	z	<!doctyperrr&r(r()rr5Zparse_marked_sectionrr*handle_declparse_bogus_comment)r	r?rgtposr
r
rr7s

z!HTMLParser.parse_html_declarationrcCsD|j}|jd|d}|dkr"dS|r<|j||d||dS)Nrr&rr(r()rr*handle_comment)r	r?Zreportrposr
r
rrHszHTMLParser.parse_bogus_commentcCsH|j}tj||d}|sdS|j}|j||d||j}|S)Nr&rr()rpicloser-r.	handle_pir;)r	r?rr2rAr
r
rr6!szHTMLParser.parse_picCsd|_|j|}|dkr|S|j}||||_g}tj||d}|j}|jdj|_}x||kr$t	j||}|s~P|jddd\}	}
}|
sd}n^|dddko|d
dkns|dddko|ddknr|dd}|rt
|}|j|	j|f|j}qbW|||j}|d
kr|j
\}
}d	|jkr|
|jjd	}
t|j|jjd	}n|t|j}|j||||S|jdr|j||n"|j||||jkr|j||S)Nrrr&rE'"r/>
r(r(r()rrP)rcheck_for_whole_start_tagrtagfind_tolerantr2r;r9rrattrfind_tolerantrappendstripZgetposcountr)r+r/endswithhandle_startendtaghandle_starttagCDATA_CONTENT_ELEMENTSr!)r	r?endposrattrsr2rBtagmZattrnamerestZ	attrvaluer;linenooffsetr
r
rr3-sP
(*

zHTMLParser.parse_starttagcCs|j}tj||}|r|j}|||d}|dkr>|dS|dkr~|jd|rZ|dS|jd|rjd	S||krv|S|dS|dkrd
S|dkrdS||kr|S|dStddS)Nrr/z/>r&r
z6abcdefghijklmnopqrstuvwxyz=/ABCDEFGHIJKLMNOPQRSTUVWXYZzwe should not get here!r(r(r()rlocatestarttagend_tolerantr2r;r0AssertionError)r	r?rr_rAnextr
r
rrR`s.z$HTMLParser.check_for_whole_start_tagcCs|j}tj||d}|sdS|j}tj||}|s|jdk	rV|j||||Stj||d}|s|||ddkr|dS|j	|S|j
dj}|jd|j}|j
||dS|j
dj}|jdk	r||jkr|j||||S|j
|j|j|S)Nrr&rEz</>rr()r	endendtagr-r;
endtagfindr2rr/rSrHr9rr*
handle_endtagr")r	r?rr2rIZ	namematchZtagnamer r
r
rr4s6


zHTMLParser.parse_endtagcCs|j|||j|dS)N)rZri)r	r^r]r
r
rrYszHTMLParser.handle_startendtagcCsdS)Nr
)r	r^r]r
r
rrZszHTMLParser.handle_starttagcCsdS)Nr
)r	r^r
r
rriszHTMLParser.handle_endtagcCsdS)Nr
)r	rCr
r
rr:szHTMLParser.handle_charrefcCsdS)Nr
)r	rCr
r
rr=szHTMLParser.handle_entityrefcCsdS)Nr
)r	rr
r
rr/szHTMLParser.handle_datacCsdS)Nr
)r	rr
r
rrJszHTMLParser.handle_commentcCsdS)Nr
)r	Zdeclr
r
rrGszHTMLParser.handle_declcCsdS)Nr
)r	rr
r
rrMszHTMLParser.handle_picCsdS)Nr
)r	rr
r
runknown_declszHTMLParser.unknown_declcCstjdtddt|S)NzZThe unescape method is deprecated and will be removed in 3.5, use html.unescape() instead.r&)
stacklevel)warningswarnDeprecationWarningr)r	sr
r
rrs
zHTMLParser.unescape)rr)r)__name__
__module____qualname____doc__r[rrrrrrr!r"rr7rHr6r3rRr4rYrZrir:r=r/rJrGrMrjrr
r
r
rr?s8		z
3"()rsrrlrZhtmlr__all__rrr>r<r8r1rLZcommentcloserSrTVERBOSErdrgrhrrr
r
r
r<module>s(