6,j(dZddlmZddlmZmZddlmZddlm Z ddlm Z ddl mZmZdd lZdd lmZmZmZd Ze jZ d-d d d.dZd/dZ d-d d d0dZ d-d d d1d!Z d-d d d2d%Z d-d d d0d&Z d3d d d4d(Z d3d d d5d*Zd6d,Zd S)7ad Soup Sieve. A CSS selector filter for BeautifulSoup4. MIT License Copyright (c) 2018 Isaac Muse Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ) annotations) __version____version_info__) css_parser) css_match) css_types)DEBUGSelectorSyntaxErrorN)AnyIteratorIterable) r r SoupSieveclosestcompilefilteriselectmatchselect select_one)custompatternstr namespacesdict[str, str] | Noneflagsintrkwargsr return cm.SoupSievec t|tr5|rtd|td|td|Stj||t j|n||t j|n||S)zCompile CSS pattern.z;Cannot process 'flags' argument on a compiled selector listNz@Cannot process 'namespaces' argument on a compiled selector listz >x H HHr*c Ft|||fi||S)zSelect a single tag.)rrr4s r)rrys, 6:u 7 7 7 7 B B3 G GGr*limitc Ht|||fi|||S)zSelect the specified tags.)rrrr0rr<rrrs r)rrs. 6:u 7 7 7 7 > >sE J JJr*Iterator[bs4.Tag]c+\Kt|||fi|||Ed{VdS)zIterate the specified tags.N)rrr>s r)rrsJvz5;;F;;CCCOOOOOOOOOOOr*identc*tj|S)zEscape identifier.)r$escape)rAs r)rCrCs 9U  r*)Nr) rrrrrrrrrr rr )rr+)rrr0r1rrrrrrrr rr2)rrr0r1rrrrrrrr rr5)rrr7r8rrrrrrrr rr9)Nrr)rrr0r1rrr<rrrrrrr rr9)rrr0r1rrr<rrrrrrr rr?)rArrr) __doc__ __future__r__meta__rrrr$rcmr r&utilr r bs4typingr r r__all__rrr/rrrrrrrCr.r*r)rMsr6#"""""33333333,,,,,,,, **********  L )- %) 6)- E %) E E E E E E")- C %) C C C C C C")- I %) I I I I I I")- H %) H H H H H H")- K%) K K K K K K$)- P%) P P P P P Pr*