/usr/lib/python3/dist-packages/lxml/html/__pycache__
NameSizeModeActions
builder.cpython-310.pyc29170644editdlrm
clean.cpython-310.pyc176780644editdlrm
defs.cpython-310.pyc27910644editdlrm
diff.cpython-310.pyc240530644editdlrm
ElementSoup.cpython-310.pyc4900644editdlrm
formfill.cpython-310.pyc73630644editdlrm
html5parser.cpython-310.pyc63930644editdlrm
soupparser.cpython-310.pyc79930644editdlrm
usedoctest.cpython-310.pyc4160644editdlrm
_diffcommand.cpython-310.pyc22760644editdlrm
_html5builder.cpython-310.pyc35820644editdlrm
_setmixin.cpython-310.pyc20750644editdlrm
__init__.cpython-310.pyc564330644editdlrm
Edit: /usr/lib/python3/dist-packages/lxml/html/__pycache__/soupparser.cpython-310.pyc (7993B)
o ;/b'@sHdZgdZddlZddlmZmZzddlmZmZm Z m Z m Z m Z m Z e e fZWneyEddlmZmZm Z m Z m Z m Z e ZYnwdddZdd d Zdd d Zd dZedejjZGdddZddZddZzddlmZWneyddlmZYnwedjZze Wn e!ye"Z YnwddZ#dS)z5External interface to the BeautifulSoup HTML parser. ) fromstringparse convert_treeN)etreehtml) BeautifulSoupTagCommentProcessingInstructionNavigableString DeclarationDoctype)rrr r r r cKst|||fi|S)aParse a string of HTML data into an Element tree using the BeautifulSoup parser. Returns the root ```` 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. )_parse)data beautifulsoup makeelementbsargsr6/usr/lib/python3/dist-packages/lxml/html/soupparser.pyrs rcKs0t|ds t|}t|||fi|}t|S)aYParse 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. read)hasattropenrr ElementTree)filerrrrootrrrr$s  rcCs*t||}|}|D]}||q |S)aConvert 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. ) _convert_tree getchildrenremove)beautiful_soup_treerrchildrenchildrrrr3s  rcKs|durt}t|drd|vrd|d<t|dr d|vr d|d<||fi|}t||}t|dkr>|djdkr>|dSd|_|S) N HTML_ENTITIESconvertEntitiesrDEFAULT_BUILDER_FEATURESfeaturesz html.parserr)rrrlentag)sourcerrrtreerrrrrEs   rz`(?:\s|[.converter..addr)r_r`r]r^)r_r convertersz(_init_node_converters..convertercs$D] }t||r|SqdSr0)r8)noder\rarrfind_best_converters   z2_init_node_converters..find_best_convertercsNzt|}Wnty|}t|<Ynw|dur"dS|||Sr0)typeKeyError)bs_nodeparentr[)r]rdrrrRs  z+_init_node_converters..convert_nodecSsZt|tr"i}|D]\}}t|trd|}t|||<q |Stdd|D}|S)N css |] \}}|t|fVqdSr0unescape).0kvrrr sz;_init_node_converters..map_attrs..)r8dictitemslistjoinrk)bs_attrsattribsrmrnrrr map_attrss   z(_init_node_converters..map_attrscSs<t|dkr|jp d||_dS|djpd||d_dS)Nrr5)r&texttail)rhrxrrr append_texts z*_init_node_converters..append_textc s|j}|dur|r |nd}tj||j|d}n|r|ni}|j|d}|D]#}zt|}Wn ty=Yn w|durG|||q*||q*|S)N)attrib)r,r SubElementr+rerf)rgrhr,ruresr r[)rRr]rrvrr convert_tags"   z*_init_node_converters..convert_tagcSs t|}|dur|||Sr0)r HtmlCommentrZrgrhr}rrrconvert_comments  z._init_node_converters..convert_commentcSs>|dr |dd}tj|dd}|dur|||S)N?r5rir%)endswithrr splitrZrrrr convert_pi s   z)_init_node_converters..convert_pics|dur |t|dSr0rj)rgrh)rzrr convert_textsz+_init_node_converters..convert_textr0)rr*r r r )rrbr~rrrr)rzrRr]rdrrvr^rr<s      r<)name2codepointz&(\w+);cCs|sdSdd}t||S)NrwcSs2z tt|dWSty|dYSw)Nr%r)unichrrgrouprf)mrrrunescape_entity5s  z!unescape..unescape_entity)handle_entities)rBrrrrrk1s rk)NNr0)$__doc____all__relxmlrrbs4rrr r r r r r: ImportErrorrrrrcompile IGNORECASErWrCr*rr< html.entitiesrhtmlentitydefssubrr NameErrorchrrkrrrrsH$       Uc