HEX
Server: Apache
System: Linux vps.rockyroadprinting.net 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: rockyroadprintin (1011)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python2.7/site-packages/bs4/builder/_lxml.pyo
�
��\[c@sddgZyddlmZWn#ek
rEZddlmZnXddlmZddlmZddl	m
Z
ddlmZm
Z
mZmZmZddlmZmZmZmZmZmZmZdd	lmZd
Zdefd��YZdeefd��YZd
S(tLXMLTreeBuilderForXMLtLXMLTreeBuilderi����(tCallable(tBytesIO(tStringIO(tetree(tCommenttDoctypetNamespacedAttributetProcessingInstructiontXMLProcessingInstruction(tFASTtHTMLtHTMLTreeBuildert
PERMISSIVEtParserRejectedMarkuptTreeBuildertXML(tEncodingDetectortlxmlcBs�eZejZeZeZdZ	dgZ
e	eee
egZdZidd6Zd�Zd�Zddd�Zd�Zdddd�Zd	�Zd
�Zid�Zd�Zd
�Zd�Zd�Zd�Zd�Z d�Z!RS(slxml-xmltxmlis$http://www.w3.org/XML/1998/namespacec	Cs8|jdk	r|jStjd|dtdtd|�S(Nttargettstrip_cdatatrecovertencoding(t_default_parsertNoneRt	XMLParsertFalsetTrue(tselfR((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pytdefault_parser5s	cCs@|j|�}t|t�r<|d|dtd|�}n|S(NRRR(Rt
isinstanceRR(RRtparser((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyt
parser_for=scCsC||_|dk	r't|�|_nd|_|jg|_dS(N(RRtsettempty_element_tagstsouptDEFAULT_NSMAPStnsmaps(RR!R$((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyt__init__Fs
		cCs8|ddkr*t|djdd��Sd|fSdS(Nit{it}(ttupletsplitR(Rttag((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyt	_getNsTagPsc	cs�|j}|rt|_n	t|_t|t�rH|d|tfVnt|t�rt|jd�d|tfVn||g}t	||||�}x%|j
D]}|j||tfVq�WdS(s�
        :yield: A series of 4-tuples.
         (markup, encoding, declared encoding,
          has undergone character replacement)

        Each 4-tuple represents a strategy for parsing the document.
        tutf8N(tis_xmlR	tprocessing_instruction_classR
R tunicodeRRtencodeRt	encodingstmarkup(	RR5tuser_specified_encodingtexclude_encodingstdocument_declared_encodingtis_htmlt
try_encodingstdetectorR((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pytprepare_markupXs
	cCst|t�rt|�}nt|t�r<t|�}n|j|j�}y�|j|jj	�|_
|j
j|�xMt|�dkr�|j|j�}t|�dkr||j
j|�q|q|W|j
j
�Wn1tttjfk
r
}tt|���nXdS(Ni(R tbytesRR2Rtreadt
CHUNK_SIZER"R%toriginal_encodingR!tfeedtlentclosetUnicodeDecodeErrortLookupErrorRtParserErrorRtstr(RR5tdatate((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyRA}scCs|jg|_dS(N(R&R'(R((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyRC�scCs�t|�}d}t|�dkrLt|j�dkrL|jjd�n�t|�dkr�td�|j�D��}|jj|�|j�}x9|j�D](\}}td|d�}|||<q�Wni}	xs|j�D]e\}
}|j|
�\}}
|dkr||	|
<q�|j	|�}t||
|�}
||	|
<q�W|	}|j|�\}}|j	|�}|j
j||||�dS(Niicss!|]\}}||fVqdS(N((t.0tkeytvalue((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pys	<genexpr>�stxmlnsshttp://www.w3.org/2000/xmlns/(tdictRRBR'tappendtitemstcopyRR.t_prefix_for_namespaceR%thandle_starttag(Rtnametattrstnsmaptnsprefixtinverted_nsmaptprefixt	namespacet	attributet	new_attrstattrRL((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pytstart�s0'
cCsN|dkrdSx7t|j�D]&}|dk	r ||kr ||Sq WdS(s9Find the currently active prefix for the given namespace.N(RtreversedR'(RRZRX((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyRR�scCs�|jj�|jjd}|j|�\}}d}|dk	r�x@t|j�D],}|dk	rT||krT||}PqTqTWn|jj||�t|j�dkr�|jj	�ndS(Ni����i(
R%tendDatattagStackR.RR_R't
handle_endtagRBtpop(RRTt
completed_tagRZRWRX((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pytend�s

cCs<|jj�|jj|d|�|jj|j�dS(Nt (R%R`thandle_dataR1(RRRH((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pytpi�s
cCs|jj|�dS(N(R%Rg(Rtcontent((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyRH�scCs6|jj�tj|||�}|jj|�dS(N(R%R`Rtfor_name_and_idstobject_was_parsed(RRTtpubidtsystemtdoctype((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyRn�s
cCs1|jj�|jj|�|jjt�dS(s#Handle comments as Comment objects.N(R%R`RgR(RRi((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pytcomment�s
cCsd|S(sSee `TreeBuilder`.u)<?xml version="1.0" encoding="utf-8"?>
%s((Rtfragment((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyttest_fragment_to_document�sN("t__name__t
__module__RRtDEFAULT_PARSER_CLASSRR0R
R1tNAMEtALTERNATE_NAMEStLXMLRRRtfeaturesR?R&RR"RR(R.R<RARCR^RRReRhRHRnRoRq(((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyR#s2		
			
	#		(							cBsTeZeZdgZeeeeegZe	Z
eZd�Z
d�Zd�ZRS(s	lxml-htmlcCstjS(N(Rt
HTMLParser(RR((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyR�scCsw|jj}y3|j|�|_|jj|�|jj�Wn1tttj	fk
rr}t
t|���nXdS(N(R%R@R"R!RARCRDRERRFRRG(RR5RRI((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyRA�scCsd|S(sSee `TreeBuilder`.u<html><body>%s</body></html>((RRp((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyRqs(RrRsRwRuRvRRRRxRR0R	R1RRARq(((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyR�s			
N(t__all__tcollections.abcRtImportErrorRItcollectionstioRRRRtbs4.elementRRRR	R
tbs4.builderRRR
RRRRt
bs4.dammitRRwRR(((s5/usr/lib/python2.7/site-packages/bs4/builder/_lxml.pyt<module>s	(4�