/usr/lib/python3/dist-packages/lxml/__pycache__
NameSizeModeActions
builder.cpython-310.pyc59080644editdlrm
cssselect.cpython-310.pyc36080644editdlrm
doctestcompare.cpython-310.pyc139370644editdlrm
ElementInclude.cpython-310.pyc37760644editdlrm
pyclasslookup.cpython-310.pyc2040644editdlrm
sax.cpython-310.pyc81700644editdlrm
usedoctest.cpython-310.pyc3940644editdlrm
_elementpath.cpython-310.pyc63300644editdlrm
__init__.cpython-310.pyc6650644editdlrm
Edit: /usr/lib/python3/dist-packages/lxml/__pycache__/cssselect.cpython-310.pyc (3608B)
o ;/b& @sdZddlmZddlmZzddlZWn eyedwejZej Z ej Z gdZ Gdd d ej Z Gd d d e ejZd d ZedZde_eed<GdddejZdS)zCSS Selectors based on XPath. This module supports selecting XML/HTML tags based on CSS selectors. See the `CSSSelector` class for details. This is a thin wrapper around cssselect 0.7 or later. )absolute_import)etreeNzRcssselect does not seem to be installed. See http://packages.python.org/cssselect/)SelectorSyntaxErrorExpressionError SelectorError CSSSelectorc@seZdZdZddZdS)LxmlTranslatorzR A custom CSS selector to XPath translator with lxml-specific extensions. cCsF|dgdgfvrtd|j|jdj}|d||S)NSTRINGIDENTz9Expected a single string or ident for :contains(), got %rrz7contains(__lxml_internal_css:lower-case(string(.)), %s))argument_typesr argumentsvalue add_condition xpath_literallower)selfxpathfunctionrr0/usr/lib/python3/dist-packages/lxml/cssselect.pyxpath_contains_function!s  z&LxmlTranslator.xpath_contains_functionN)__name__ __module__ __qualname____doc__rrrrrr s r c@seZdZdZdS)LxmlHTMLTranslatorz) lxml extensions + HTML support. N)rrrrrrrrr.srcCs|S)N)r)contextsrrr_make_lower_case4srzhttp://codespeak.net/lxml/css/__lxml_internal_cssz lower-casec@s"eZdZdZdddZddZdS) raA CSS selector. Usage:: >>> from lxml import etree, cssselect >>> select = cssselect.CSSSelector("a tag > child") >>> root = etree.XML("TEXT") >>> [ el.tag for el in select(root) ] ['child'] To use CSS namespaces, you need to pass a prefix-to-namespace mapping as ``namespaces`` keyword argument:: >>> rdfns = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >>> select_ns = cssselect.CSSSelector('root > rdf|Description', ... namespaces={'rdf': rdfns}) >>> rdf = etree.XML(( ... '' ... 'blah' ... '') % rdfns) >>> [(el.tag, el.text) for el in select_ns(rdf)] [('{http://www.w3.org/1999/02/22-rdf-syntax-ns#}Description', 'blah')] NxmlcCsX|dkrt}n|dkrt}n |dkrtdd}||}tjj|||d||_dS)Nr!htmlxhtmlT)r#) namespaces)r r css_to_xpathrXPath__init__css)rr(r$ translatorpathrrrr'Ws   zCSSSelector.__init__cCs(d|jjttt|dd|jfS)Nz<%s %s for %r>) __class__rhexabsidr()rrrr__repr__bs zCSSSelector.__repr__)Nr!)rrrrr'r0rrrrr<s  r)r __future__rr cssselectexternal_cssselect ImportErrorrrr__all__GenericTranslatorr HTMLTranslatorrrFunctionNamespacensprefixr&rrrrrs*