Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/lxml/html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/lxml/html/soupparser.pyc
�
�ePc@sdZdddgZddlmZmZddlmZmZmZmZm	Z	ddd�Zddd�Zdd	�Z
d
�Zd�Zd�Zd
�ZyddlmZWn!ek
r�ddlmZnXddlZejd�jZd�ZdS(s5External interface to the BeautifulSoup HTML parser.
t
fromstringtparsetconvert_treei����(tetreethtml(t
BeautifulSouptTagtCommenttProcessingInstructiontNavigableStringcKst||||�S(s�Parse a string of HTML data into an Element tree using the
    BeautifulSoup parser.

    Returns the root ``<html>`` Element of the tree.

    You can pass a different BeautifulSoup parser through the
    `beautifulsoup` keyword, and a diffent Element factory function
    through the `makeelement` keyword.  By default, the standard
    ``BeautifulSoup`` class and the default factory of `lxml.html` are
    used.
    (t_parse(tdatat
beautifulsouptmakeelementtbsargs((s:/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyRscKs@t|d�st|�}nt||||�}tj|�S(sYParse a file into an ElemenTree using the BeautifulSoup parser.

    You can pass a different BeautifulSoup parser through the
    `beautifulsoup` keyword, and a diffent Element factory function
    through the `makeelement` keyword.  By default, the standard
    ``BeautifulSoup`` class and the default factory of `lxml.html` are
    used.
    tread(thasattrtopenR
RtElementTree(tfileRR
Rtroot((s:/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyRs	cCsX|dkrtjj}nt||�}|j�}x|D]}|j|�q=W|S(sConvert a BeautifulSoup tree to a list of Element trees.

    Returns a list instead of a single root Element to support
    HTML-like soup with more than one root element.

    You can pass a different Element factory through the `makeelement`
    keyword.
    N(tNoneRthtml_parserR
t
_convert_treetgetchildrentremove(tbeautiful_soup_treeR
Rtchildrentchild((s:/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyR's	
cKs�|dkrt}n|dkr0tjj}nd|krId|d<n|||�}t||�}t|�dkr�|djdkr�|dSd|_|S(NtconvertEntitiesRii(RRRRR
Rtlenttag(tsourceRR
RttreeR((s:/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyR
;s	
%	cCs2||jdt|j��}t|||�|S(Ntattrib(tnametdicttattrst_convert_children(RR
R((s:/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyRJscCs)tj}d}x|D]}t|t�r�|||jdtg|jD]\}}|t|�f^qG��}t	|||�qt
|�tkr�t||t|��qt|t
�r�|jtj
|��qt|t�r|jtj|jdd���qt||t|��qWdS(NR"t i(Rt
SubElementRt
isinstanceRR#R$R%tunescapeR&ttypeR	t_append_textRtappendRtsplit(tparentRR
R(tet_childRtktv((s:/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyR&Ps	
4cCs?|dkr%|jpd||_n|jp1d||_dS(Nt(Rttextttail(R/telementR4((s:/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyR,cs(tname2codepointNs&(\w+);cCs |s
dSd�}t||�S(NR3cSs=ytt|jd��SWntk
r8|jd�SXdS(Nii(tunichrR7tgrouptKeyError(tm((s:/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pytunescape_entityxs
(thandle_entities(tstringR<((s:/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyR*ts	(t__doc__t__all__tlxmlRRRRRRR	RRRRR
RR&R,t
html.entitiesR7tImportErrorthtmlentitydefstretcompiletsubR=R*(((s:/usr/lib64/python2.7/site-packages/lxml/html/soupparser.pyt<module>s"(					


ZeroDay Forums Mini