Files
wg-backend-django/acer-env/lib/python3.10/site-packages/bs4/__pycache__/element.cpython-310.pyc

976 lines
65 KiB
Plaintext
Raw Normal View History

2022-11-30 15:58:16 +07:00
o
<00>Ԅc<D484>R<00>
@s4dZzddlmZWney"Zz ddlmZWYdZ[ndZ[wwddlZddlZddlZzddl Z WneyNZz dZ e<08>
d<04>WYdZ[ndZ[wwddl m Z m Z mZdZe<06>d<07>Ze<06>d<08>Zd d
<EFBFBD>Zegd <0B><01>ZGd d <0A>d e<16>ZGdd<0F>de<16>ZGdd<11>de<18>ZGdd<13>de<18>ZGdd<15>de<1B>ZGdd<17>dee<1C>ZGdd<19>de<1D>ZGdd<1B>de<1E>ZGdd<1D>de<1E>Z Gdd<1F>de <20>Z!Gd d!<21>d!e<1E>Z"Gd"d#<23>d#e<1E>Z#Gd$d%<25>d%e<1E>Z$Gd&d'<27>d'e<1D>Z%Gd(d)<29>d)e<1D>Z&Gd*d+<2B>d+e<1D>Z'Gd,d-<2D>d-e<1D>Z(Gd.d/<2F>d/e<1D>Z)Gd0d1<64>d1e<1C>Z*Gd2d3<64>d3e<1B>Z+Gd4d5<64>d5e,<2C>Z-dS)6<>MIT<49>)<01>CallableNzEThe soupsieve package is not installed. CSS selectors cannot be used.)<03> Formatter<65> HTMLFormatter<65> XMLFormatterzutf-8z\S+z\s+cs&t<00>fdd<02><08>}|j<01>fdd<02><08>}|S)z>Alias one attribute name to another for backward compatibilityc<00>
t|<00><00>S<00>N<><01>getattr<74><01>self<6C><01>attr<74><00>^/home/infidel/Sync/Project/ocp-wg-backend/acer-env/lib/python3.10/site-packages/bs4/element.py<70>alias#<00>
z_alias.<locals>.aliascrr)<01>setattrr r rrr'r)<02>property<74>setter)rrrr r<00>_alias!s
r) <0C>idna<6E>mbcs<63>oem<65>palmos<6F>punycode<64>raw_unicode_escape<70> undefined<65>unicode_escapezraw-unicode-escape<70>unicode-escapez string-escape<70> string_escapec@seZdZdZddd<04>ZdS)<06>NamespacedAttributez<65>A namespaced string (e.g. 'xml:lang') that remembers the namespace
('xml') and the name ('lang') that were used to create it.
NcCsV|sd}|s t<00>||<01>}n|st<00>||<02>}n
t<00>||d|<00>}||_||_||_|S)N<>:)<05>str<74>__new__<5F>prefix<69>name<6D> namespace)<05>clsr%r&r'<00>objrrrr$OszNamespacedAttribute.__new__<5F>NN)<05>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r$rrrrr!Jsr!c@<00>eZdZdZdS)<03>%AttributeValueWithCharsetSubstitutionz=A stand-in object for a character encoding specified in HTML.N<>r+r,r-r.rrrrr0asr0c@s eZdZdZdd<03>Zdd<05>ZdS)<07>CharsetMetaAttributeValuez<65>A generic stand-in for the value of a meta tag's 'charset' attribute.
When Beautiful Soup parses the markup '<meta charset="utf8">', the
value of the 'charset' attribute will be one of these objects.
cCst<00>||<01>}||_|Sr)r#r$<00>original_value)r(r3r)rrrr$ks z!CharsetMetaAttributeValue.__new__cCs|tvrdS|S)z<>When an HTML document is being encoded to a given encoding, the
value of a meta tag's 'charset' is the name of the encoding.
<20>)<01>PYTHON_SPECIFIC_ENCODINGS<47>r <00>encodingrrr<00>encodepsz CharsetMetaAttributeValue.encodeN)r+r,r-r.r$r8rrrrr2ds r2c@s.eZdZdZe<04>dej<06>Zdd<04>Zdd<06>Z dS)<08>ContentMetaAttributeValueaA generic stand-in for the value of a meta tag's 'content' attribute.
When Beautiful Soup parses the markup:
<meta http-equiv="content-type" content="text/html; charset=utf8">
The value of the 'content' attribute will be one of these objects.
z((^|;)\s*charset=)([^;]*)cCs6|j<00>|<01>}|durt<02>t|<01>St<02>||<01>}||_|Sr)<05>
CHARSET_RE<EFBFBD>searchr#r$r3)r(r3<00>matchr)rrrr$<00>s   z!ContentMetaAttributeValue.__new__cs(<00>tvrdS<00>fdd<03>}|j<01>||j<03>S)Nr4cs|<00>d<01><01>S)N<>)<01>group)r<<00>r7rr<00>rewrite<74>sz1ContentMetaAttributeValue.encode.<locals>.rewrite)r5r:<00>subr3)r r7r@rr?rr8<00>s z ContentMetaAttributeValue.encodeN)
r+r,r-r.<00>re<72>compile<6C>Mr:r$r8rrrrr9ys

r9c@s`eZdZdZ  d\dd<04>Zdd<06>Zdd<08>Zed d
<EFBFBD><00>Ze d <0B>Z
e d <0C>Z e <0C>Z d e fdd<0F>Zedd<11><00>Zdd e fdd<14>ZeZee<10>Zdd<16>ZeZdd<18>ZeZeZdd<1A>Zd]dd<1C>Zd^dd<1F>ZeZd d!<21>Zd"d#<23>Zd$d%<25>Zd&d'<27>Zd(d)<29>Z didfd*d+<2B>Z!e!Z"diddfd,d-<2D>Z#e#Z$didfd.d/<2F>Z%e%Z&diddfd0d1<64>Z'e'Z(e'Z)didfd2d3<64>Z*e*Z+diddfd4d5<64>Z,e,Z-e,Z.didfd6d7<64>Z/e/Z0diddfd8d9<64>Z1e1Z2e1Z3difd:d;<3B>Z4e4Z5didfd<d=<3D>Z6e6Z7e6Z8ed>d?<3F><00>Z9ed@dA<64><00>Z:dBdC<64>Z;dDdE<64>Z<edFdG<64><00>Z=edHdI<64><00>Z>edJdK<64><00>Z?edLdM<64><00>Z@edNdO<64><00>ZAedPdQ<64><00>ZBdRdS<64>ZCdTdU<64>ZDdVdW<64>ZEdXdY<64>ZFdZd[<5B>ZGdS)_<> PageElementz<74>Contains the navigational information for some part of the page:
that is, its current location in the parse tree.
NavigableString, Tag, etc. are all subclasses of PageElement.
NcCs<>||_||_|dur||j_||_|jdur||j_||_|jdur&||j_|dur9|jdur9|jjr9|jjd}||_|durF||j_dSdS)aRSets up the initial relations between this element and
other elements.
:param parent: The parent of this element.
:param previous_element: The element parsed immediately before
this one.
:param next_element: The element parsed immediately before
this one.
:param previous_sibling: The most recently encountered element
on the same level of the parse tree as this one.
:param previous_sibling: The next element to be encountered
on the same level of the parse tree as this one.
N<><4E><EFBFBD><EFBFBD><EFBFBD>)<06>parent<6E>previous_element<6E> next_element<6E> next_sibling<6E>previous_sibling<6E>contents)r rGrHrIrKrJrrr<00>setup<75>s(

<02><02>  <04>zPageElement.setupcCs.|dur|St|t<01>s|<00>|<02>}|<02>|<01>}|S)z<>Format the given string using the given formatter.
:param s: A string.
:param formatter: A Formatter object, or a string naming one of the standard formatters.
N)<04>
isinstancer<00>formatter_for_name<6D>
substitute)r <00>s<> formatter<65>outputrrr<00> format_string<6E>s 


zPageElement.format_stringcCs<t|t<01>r|S|jr t}nt}t|t<05>r||d<01>S|j|S)a|Look up or create a Formatter for the given identifier,
if necessary.
:param formatter: Can be a Formatter object (used as-is), a
function (used as the entity substitution hook for an
XMLFormatter or HTMLFormatter), or a string (used to look
up an XMLFormatter or HTMLFormatter in the appropriate
registry.
)<01>entity_substitution)rNr<00>_is_xmlrrr<00>REGISTRY)r rR<00>crrrrO<00>s



zPageElement.formatter_for_namecCs.|jdur|jS|jdurt|dd<03>S|jjS)aIs this element part of an XML tree or an HTML tree?
This is used in formatter_for_name, when deciding whether an
XMLFormatter or HTMLFormatter is more appropriate. It can be
inefficient, but it should be called very rarely.
N<>is_xmlF)<04> known_xmlrGr
rVr rrrrV<00>s

 zPageElement._is_xmlrJrKFcCst<00><00>)z<>Yield all strings of certain classes, possibly stripping them.
This is implemented differently in Tag and NavigableString.
)<01>NotImplementedError)r <00>strip<69>typesrrr<00> _all_stringsszPageElement._all_stringsccs<00>|<00>d<01>D]}|VqdS)zvYield all strings in this PageElement, stripping them first.
:yield: A sequence of stripped strings.
TN)r^<00>r <00>stringrrr<00>stripped_strings s<02><04>zPageElement.stripped_stringsr4cCs|<01>dd<02>|j||d<03>D<00><01>S)a<>Get all child strings of this PageElement, concatenated using the
given separator.
:param separator: Strings will be concatenated using this separator.
:param strip: If True, strings will be stripped before being
concatenated.
:param types: A tuple of NavigableString subclasses. Any
strings of a subclass not found in this list will be
ignored. Although there are exceptions, the default
behavior in most cases is to consider only NavigableString
and CData objects. That means no comments, processing
instructions, etc.
:return: A string.
cSsg|]}|<01>qSrr)<02>.0rQrrr<00>
<listcomp>%sz(PageElement.get_text.<locals>.<listcomp>)r])<02>joinr^)r <00> separatorr\r]rrr<00>get_texts <0C>zPageElement.get_textcs<><00>jdur td<02><01>t|<01>dkr|d<00>urdSt<03>fdd<06>|D<00><01>r&td<07><01><01>j}<02>j<00><04><00>}<03>j|d<08>t||d <09>D]
\}}|<02>||<05>q;<3B>S)
z<EFBFBD>Replace this PageElement with one or more PageElements, keeping the
rest of the tree the same.
:param args: One or more PageElements.
:return: `self`, no longer part of the tree.
Nz^Cannot replace one element with another when the element to be replaced is not part of a tree.r=rc3s<00>|]}|<01>juVqdSr<00>rG<00>rb<00>xr rr<00> <genexpr>7s<02>z+PageElement.replace_with.<locals>.<genexpr>z%Cannot replace a Tag with its parent.<2E><01> _self_index)<01>start)rG<00>
ValueError<EFBFBD>len<65>any<6E>index<65>extract<63> enumerate<74>insert)r <00>args<67>
old_parent<EFBFBD>my_index<65>idx<64> replace_withrr rry*s
<04>  zPageElement.replace_withcCsX|j}|jdur td<02><01>|j<00>|<00>}|j|d<03>t|jdd<01><00>D]}|<01>||<03>q!|S)zjReplace this PageElement with its contents.
:return: `self`, no longer part of the tree.
NzSCannot replace an element with its contents when thatelement is not part of a tree.rk)rGrnrqrr<00>reversedrLrt)r <00> my_parentrw<00>childrrr<00>unwrapAs
<04>  zPageElement.unwrapcCs|<00>|<01>}|<01>|<02>|S)z<>Wrap this PageElement inside another one.
:param wrap_inside: A PageElement.
:return: `wrap_inside`, occupying the position in the tree that used
to be occupied by `self`, and with `self` inside it.
)ry<00>append)r <00> wrap_inside<64>merrr<00>wrapSs

zPageElement.wrapcCs<>|jdur|dur|j<00>|<00>}|jj|=|<00><03>}|j}|jdur)|j|ur)||j_|dur6||jur6|j|_d|_d|_d|_|jdurO|j|jurO|j|j_|jdur_|j|jur_|j|j_d|_|_|S)aDestructively rips this element out of the tree.
:param _self_index: The location of this element in its parent's
.contents, if known. Passing this in allows for a performance
optimization.
:return: `self`, no longer part of the tree.
N)rGrqrL<00>_last_descendantrIrHrKrJ)r rl<00>
last_childrIrrrrr^s2
 

<02>

<02>


<02>
 zPageElement.extractTcCsZ|r |jdur |jj}n|}t|t<03>r#|jr#|jd}t|t<03>r#|js|s+||ur+d}|S)z<>Finds the last element beneath this object to be parsed.
:param is_initialized: Has `setup` been called on this PageElement
yet?
:param accept_self: Is `self` an acceptable answer to the question?
NrF)rJrHrN<00>TagrL)r <00>is_initialized<65> accept_selfr<66>rrrr<><00>s

<10> zPageElement._last_descendantc Cs<>|durtd<02><01>||urtd<03><01>t|t<02>rt|t<03>st|<02>}ddlm}t||<03>r=t|j<07>D] }|<00>||<04>|d7}q.dSt |t
|j<07><01>}t |d<07>re|j dure|j |ura|<00> |<02>}||kra|d8}|<02><0E>||_ d}|dkrud|_||_n|j|d}||_||j_|<06>d<08>|_|jdur<>||j_|<02>d<08>}|t
|j<07>kr<>d|_|}d} | dur<>|dur<>|j} |j }| dur<>n| dur<>|dus<>| dur<>| |_nd|_n|j|}
|
|_|jdur<>||j_|
|_|jdur<>||j_|j<07>||<02>dS) a'Insert a new PageElement in the list of this PageElement's children.
This works the same way as `list.insert`.
:param position: The numeric position that should be occupied
in `self.children` by the new PageElement.
:param new_child: A PageElement.
NzCannot insert None into a tag.z Cannot insert a tag into itself.r)<01> BeautifulSoupr=rGF)rnrNr#<00>NavigableString<6E>bs4r<34><00>listrLrt<00>minro<00>hasattrrGrqrrrKrHrJr<>rI) r <00>position<6F> new_childr<64><00>subchild<6C> current_index<65>previous_child<6C>new_childs_last_elementrG<00>parents_next_sibling<6E>
next_childrrrrt<00>sl 
<02> 
 


 

<10>


zPageElement.insertcCs|<00>t|j<02>|<01>dS)zgAppends the given PageElement to the contents of this one.
:param tag: A PageElement.
N)rtrorL)r <00>tagrrrr~<00>szPageElement.appendcCs,t|t<01>r
t|j<03>}|D]}|<00>|<02>q dS)zmAppends the given PageElements to this one's contents.
:param tags: A list of PageElements.
N)rNr<>r<>rLr~)r <00>tagsr<73>rrr<00>extend<6E>s

 <04>zPageElement.extendcsj<00>j}|dur td<02><01>t<02>fdd<04>|D<00><01>rtd<05><01>|D]}t|t<04>r'|<03><05>|<02><06><00>}|<02>||<03>qdS)z<>Makes the given element(s) the immediate predecessor of this one.
All the elements will have the same parent, and the given elements
will be immediately before this one.
:param args: One or more PageElements.
Nz2Element has no parent, so 'before' has no meaning.c3<00><00>|]}|<01>uVqdSrrrhr rrrj <00><02>z,PageElement.insert_before.<locals>.<genexpr>z&Can't insert an element before itself.<2E>rGrnrprNrErrrqrt)r rurG<00> predecessorrqrr r<00> insert_before<72>s<04>

<04>zPageElement.insert_beforecs~<00>j}|dur td<02><01>t<02>fdd<04>|D<00><01>rtd<05><01>d}|D]}t|t<04>r)|<04><05>|<02><06><00>}|<02>|d||<04>|d7}qdS)z<>Makes the given element(s) the immediate successor of this one.
The elements will have the same parent, and the given elements
will be immediately after this one.
:param args: One or more PageElements.
Nz1Element has no parent, so 'after' has no meaning.c3r<>rrrhr rrrj r<>z+PageElement.insert_after.<locals>.<genexpr>z%Can't insert an element after itself.rr=r<>)r rurG<00>offset<65> successorrqrr r<00> insert_afters <04>


<04>zPageElement.insert_aftercK<00>|j|j|||fi|<04><01>S)aUFind the first PageElement that matches the given criteria and
appears later in the document than this PageElement.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString
)<02> _find_one<6E> find_all_next<78>r r&<00>attrsr`<00>kwargsrrr<00> find_next-szPageElement.find_nextcK<00>|j|||||jfi|<05><01>S)aiFind all PageElements that match the given criteria and appear
later in the document than this PageElement.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A ResultSet containing PageElements.
)<02> _find_all<6C> next_elements<74>r r&r<>r`<00>limitr<74>rrrr<>>s<06>zPageElement.find_all_nextcKr<>)aQFind the closest sibling to this PageElement that matches the
given criteria and appears later in the document.
All find_* methods take a common set of arguments. See the
online documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString
)r<><00>find_next_siblingsr<73>rrr<00>find_next_siblingQ<00><06>zPageElement.find_next_siblingcKr<>)a<>Find all siblings of this PageElement that match the given criteria
and appear later in the document.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A ResultSet of PageElements.
:rtype: bs4.element.ResultSet
)r<><00> next_siblingsr<73>rrrr<>c<00>
<04><06>zPageElement.find_next_siblingscKr<>)aVLook backwards in the document from this PageElement and find the
first PageElement that matches the given criteria.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString
)r<><00>find_all_previousr<73>rrr<00> find_previousxs

<04><06>zPageElement.find_previouscKr<>)a<>Look backwards in the document from this PageElement and find all
PageElements that match the given criteria.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A ResultSet of PageElements.
:rtype: bs4.element.ResultSet
)r<><00>previous_elementsr<73>rrrr<><00>s<06>zPageElement.find_all_previouscKr<>)aVReturns the closest sibling to this PageElement that matches the
given criteria and appears earlier in the document.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString
)r<><00>find_previous_siblingsr<73>rrr<00>find_previous_sibling<6E>r<>z!PageElement.find_previous_siblingcKr<>)a<>Returns all siblings to this PageElement that match the
given criteria and appear earlier in the document.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A ResultSet of PageElements.
:rtype: bs4.element.ResultSet
)r<><00>previous_siblingsr<73>rrrr<><00>r<>z"PageElement.find_previous_siblingscKs*d}|j||dfi|<03><01>}|r|d}|S)a<>Find the closest parent of this PageElement that matches the given
criteria.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString
Nr=r)<01> find_parents)r r&r<>r<><00>r<>lrrr<00> find_parent<6E>s
zPageElement.find_parentcKs|j||d||jfi|<04><01>S)aFind all parents of this PageElement that match the given criteria.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString
N)r<><00>parents)r r&r<>r<>r<>rrrr<><00>s<06>zPageElement.find_parentscC<00>|jS)z<>The PageElement, if any, that was parsed just after this one.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString
<20>rIr rrr<00>next<78><00>zPageElement.nextcCr<>)z<>The PageElement, if any, that was parsed just before this one.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString
<20>rHr rrr<00>previous<75>r<>zPageElement.previouscKs*d}||||dfi|<05><01>}|r|d}|S)Nr=rr)r <00>methodr&r<>r`r<>r<>r<>rrrr<>s
zPageElement._find_onec  s8|durd|vr|<06>d<02>}t<01>dt<03>t<04>t<05>r<1B>}n
t<05>||fi|<06><01>}|durl|sl|sl|sl<73>dus7<73>durCdd<06>|D<00>}t||<08>St<04>t<07>rl<72><01>d<07>dkrX<72><01> dd<08>\<02><02>nd<01><02><01><00><00><01>fd d<06>|D<00>}t||<08>St|<07>} zt
|<05>}
Wn
t y<>Y| Sw|
r<EFBFBD>|<07> |
<EFBFBD>} | r<>| <09> | <0B>|r<>t| <09>|kr<> | Sqq)
z8Iterates over a generator looking for things that match.N<>textzOThe 'text' argument to find()-type methods is deprecated. Use 'string' instead.Tcss<00>|]
}t|t<01>r|VqdSr)rNr<><00>rb<00>elementrrrrjs<02><0E>z(PageElement._find_all.<locals>.<genexpr>r"r=c3sD<00>|]}t|t<01>r|j<02>ks|j<02>kr<02>dus|j<03>kr|VqdSr)rNr<>r&r%r<><00><03>
local_namer&r%rrrj*s<02><02><02><02><02><0E>)<0F>pop<6F>warnings<67>warn<72>DeprecationWarningrN<00> SoupStrainer<65> ResultSetr#<00>count<6E>splitr<74><00> StopIterationr;r~ro) r r&r<>r`r<><00> generatorr<72><00>strainer<65>result<6C>results<74>i<>foundrr<>rr<> sH
<04>



  <02>

<02>zPageElement._find_allcc<00>,<00>|j}|dur|V|j}|dusdSdS)zgAll PageElements that were parsed after this one.
:yield: A sequence of PageElements.
Nr<4E><00>r r<>rrrr<>D<00> <02><10>zPageElement.next_elementsccr<>)z<>All PageElements that are siblings of this one but were parsed
later.
:yield: A sequence of PageElements.
N)rJr<>rrrr<>O<00> <02><10>zPageElement.next_siblingsccr<>)zhAll PageElements that were parsed before this one.
:yield: A sequence of PageElements.
Nr<4E>r<>rrrr<>[r<>zPageElement.previous_elementsccr<>)z<>All PageElements that are siblings of this one but were parsed
earlier.
:yield: A sequence of PageElements.
N)rKr<>rrrr<>fr<>zPageElement.previous_siblingsccr<>)zlAll PageElements that are parents of this PageElement.
:yield: A sequence of PageElements.
Nrgr<>rrrr<>rr<>zPageElement.parentscCst|dd<02>pdS)zOCheck whether a PageElement has been decomposed.
:rtype: bool
<20> _decomposedFr r rrr<00>
decomposed}szPageElement.decomposedcCr<>r)r<>r rrr<00> nextGenerator<6F><00>zPageElement.nextGeneratorcCr<>r)r<>r rrr<00>nextSiblingGenerator<6F>r<>z PageElement.nextSiblingGeneratorcCr<>r)r<>r rrr<00>previousGenerator<6F>r<>zPageElement.previousGeneratorcCr<>r)r<>r rrr<00>previousSiblingGenerator<6F>r<>z$PageElement.previousSiblingGeneratorcCr<>r)r<>r rrr<00>parentGenerator<6F>r<>zPageElement.parentGenerator)NNNNNr)TT)Hr+r,r-r.rMrTrOrrVr<00> nextSibling<6E>previousSibling<6E>object<63>defaultr^rarf<00>getTextr<74>ry<00> replaceWithr}<00>replace_with_children<65>replaceWithChildrenr<6E>rrr<><00>_lastRecursiveChildrtr~r<>r<>r<>r<><00>findNextr<74><00> findAllNextr<74><00>findNextSiblingr<67><00>findNextSiblings<67>fetchNextSiblingsr<73><00> findPreviousr<73><00>findAllPrevious<75> fetchPreviousr<73><00>findPreviousSiblingr<67><00>findPreviousSiblings<67>fetchPreviousSiblingsr<73><00>
findParentr<EFBFBD><00> findParents<74> fetchParentsr<73>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rrrrrE<00>s<>
<EFBFBD>) 


<EFBFBD>
&R 
<EFBFBD>


9





  rEc@sxeZdZdZdZdZdZdd<05>Zdd<07>Zdd <09>Z d
d <0B>Z
dd d<0E>Z e dd<10><00>Z e jdd<10><00>Z dejfdd<14>Ze e<11>ZdS)r<>z<>A Python Unicode string that is part of a parse tree.
When Beautiful Soup parses the markup <b>penguin</b>, it will
create a NavigableString for the string "penguin".
r4NcCs2t|t<01>r t<01>||<01>}nt<01>||t<03>}|<02><04>|S)a-Create a new NavigableString.
When unpickling a NavigableString, this method is called with
the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be
passed in to the superclass's __new__ or the superclass won't know
how to handle non-ASCII characters.
)rNr#r$<00>DEFAULT_OUTPUT_ENCODINGrM)r(<00>value<75>urrrr$<00>s
zNavigableString.__new__cCs t|<00>|<00>S)z<>A copy of a NavigableString has the same contents and class
as the original, but it is not connected to the parse tree.
)<01>typer rrr<00>__copy__<5F>s zNavigableString.__copy__cCs
t|<00>fSr)r#r rrr<00>__getnewargs__<5F><00>
zNavigableString.__getnewargs__cCs |dkr|Std|jj|f<00><01>)z<>text.string gives you text. This is for backwards
compatibility for Navigable*String, but for CData* it lets you
get the string without the CData wrapper.r`<00>!'%s' object has no attribute '%s')<03>AttributeError<6F> __class__r+)r rrrr<00> __getattr__<5F>s<04><04>zNavigableString.__getattr__<5F>minimalcCs|<00>||<01>}|j||jS)z<>Run the string through the provided formatter.
:param formatter: A Formatter object, or a string naming one of the standard formatters.
<20>rT<00>PREFIX<49>SUFFIX)r rRrSrrr<00> output_ready<64>s zNavigableString.output_readycC<00>dS)z<>Since a NavigableString is not a Tag, it has no .name.
This property is implemented so that code like this doesn't crash
when run on a mixture of Tag and NavigableString objects:
[x.name for x in tag.children]
Nrr rrrr&<00>szNavigableString.namecCstd<01><01>)z1Prevent NavigableString.name from ever being set.z)A NavigableString cannot be given a name.<2E>r)r r&rrrr&<00>sFccsp<00>||jur tj}t|<00>}|dur#t|t<03>r||urdSn||vr#dS|}|r+|<04><05>}t|<04>dkr6|VdSdS)a<>Yield all strings of certain classes, possibly stripping them.
This makes it easy for NavigableString to implement methods
like get_text() as conveniences, creating a consistent
text-extraction API across all PageElements.
:param strip: If True, all strings will be stripped before being
yielded.
:param types: A tuple of NavigableString subclasses. If this
NavigableString isn't one of those subclasses, the
sequence will be empty. By default, the subclasses
considered are NavigableString and CData objects. That
means no comments, processing instructions, etc.
:yield: A sequence that either contains this string, or is empty.
Nr)r<>r<><00> DEFAULT_INTERESTING_STRING_TYPESr<53>rNr\ro)r r\r]<00>my_typer<65>rrrr^<00>s"<02>
 
<02> 
<04>zNavigableString._all_strings)r)r+r,r-r.rrrZr$r<>r<>rr rr&rrEr<>r^<00>stringsrrrrr<><00>s 


 .r<>c@s"eZdZdZdZdZddd<05>ZdS)<07>PreformattedStringz<67>A NavigableString not subject to the normal formatting rules.
This is an abstract class used for special kinds of strings such
as comments (the Comment class) and CDATA blocks (the CData
class).
r4NcCs$|dur
|<00>||<01>}|j||jS)a<>Make this string ready for output by adding any subclass-specific
prefix or suffix.
:param formatter: A Formatter object, or a string naming one
of the standard formatters. The string will be passed into the
Formatter, but only to trigger any side effects: the return
value is ignored.
:return: The string, with any subclass-specific prefix and
suffix added on.
Nr)r rR<00>ignorerrrr s zPreformattedString.output_readyr)r+r,r-r.rrr rrrrrs
rc@<00>eZdZdZdZdZdS)<05>CDatazA CDATA block.z <![CDATA[z]]>N<>r+r,r-r.rrrrrrr+<00>rc@r)<05>ProcessingInstructionzA SGML processing instruction.<2E><?<3F>>Nrrrrrr0src@r)<05>XMLProcessingInstructionzAn XML processing instruction.r<00>?>Nrrrrrr6rrc@r)<05>CommentzAn HTML or XML comment.z<!--z-->Nrrrrrr;rrc@r)<05> DeclarationzAn XML declaration.rrNrrrrrrArrc@s$eZdZdZedd<03><00>ZdZdZdS)<07>DoctypezA document type declaration.cCsT|pd}|dur|d|7}|dur|d|7}t|<04>S|dur&|d|7}t|<04>S)a<>Generate an appropriate document type declaration for a given
public ID and system ID.
:param name: The name of the document's root element, e.g. 'html'.
:param pub_id: The Formal Public Identifier for this document type,
e.g. '-//W3C//DTD XHTML 1.1//EN'
:param system_id: The system identifier for this document type,
e.g. 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'
:return: A Doctype.
r4Nz PUBLIC "%s"z "%s"z SYSTEM "%s")r)r(r&<00>pub_id<69> system_idr<64>rrr<00>for_name_and_idsIs   <08> zDoctype.for_name_and_idsz
<!DOCTYPE z>
N)r+r,r-r.<00> classmethodrrrrrrrrGs 
rc@r/)<03>
Stylesheetz<EFBFBD>A NavigableString representing an stylesheet (probably
CSS).
Used to distinguish embedded stylesheets from textual content.
Nr1rrrrr!d<00>r!c@r/)<03>Scriptz<74>A NavigableString representing an executable script (probably
Javascript).
Used to distinguish executable code from textual content.
Nr1rrrrr#mr"r#c@r/)<03>TemplateStringz<67>A NavigableString representing a string found inside an HTML
template embedded in a larger document.
Used to distinguish such strings from the main body of the document.
Nr1rrrrr$vr"r$c@r/)<03>RubyTextStringz<67>A NavigableString representing the contents of the <rt> HTML
element.
https://dev.w3.org/html5/spec-LC/text-level-semantics.html#the-rt-element
Can be used to distinguish such strings from the strings they're
annotating.
Nr1rrrrr%sr%c@r/)<03>RubyParenthesisStringz<67>A NavigableString representing the contents of the <rp> HTML
element.
https://dev.w3.org/html5/spec-LC/text-level-semantics.html#the-rp-element
Nr1rrrrr&<00>r"r&c@seZdZdZ       d_dd<04>Zed<05>Zdd<07>Zedd <09><00>Z e Z
ed
d <0B><00>Z e j d d <0B><00>Z e efZd ejfdd<0F>Zee<12>Zdd<11>Zd`dd<13>Zdd<15>Zdd<17>Zdadd<19>Zdadd<1B>Zdd<1D>Zdd<1F>Zd d!<21>Zd"d#<23>Zd$d%<25>Zd&d'<27>Zd(d)<29>Z d*d+<2B>Z!d,d-<2D>Z"d.d/<2F>Z#d0d1<64>Z$d2d3<64>Z%d4d5<64>Z&dbd7d8<64>Z'd9d:<3A>Z(e(Z)Z'e*dd;d<fd=d><3E>Z+de*d;fd?d@<40>Z,dAdB<64>Z-dcdCdD<64>Z.de*d;fdEdF<64>Z/de*d;fdGdH<64>Z0e*d dIfdJdK<64>Z1didLdfdMdN<64>Z2e2Z3didLddfdOdP<64>Z4e4Z5e4Z6edQdR<64><00>Z7edSdT<64><00>Z8dadUdV<64>Z9dddWdX<64>Z:dYdZ<64>Z;d[d\<5C>Z<d]d^<5E>Z=dS)er<65>z<>Represents an HTML or XML tag that is part of a parse tree, along
with its attributes and contents.
When Beautiful Soup parses the markup <b>penguin</b>, it will
create a Tag object representing the <b> tag.
NcCsR|durd|_n|j|_|durtd<02><01>||_||_|pi|_||_|r'|jr5|
dus/| dur5|
|_| |_ |dur<i}n|rR|durM|j
rM|<02> |j|<06>}n t |<06>}nt |<06>}|r]|j |_n| |_||_g|_|<00>||<08>d|_|dur<>| |_| |_
||_||_dS|<02>|<00>|<02>|<03>|_|j
|_
|j|_|j|jvr<>|j|j|_dS|j|_dS)aMBasic constructor.
:param parser: A BeautifulSoup object.
:param builder: A TreeBuilder.
:param name: The name of the tag.
:param namespace: The URI of this Tag's XML namespace, if any.
:param prefix: The prefix for this Tag's XML namespace, if any.
:param attrs: A dictionary of this Tag's attribute values.
:param parent: The PageElement to use as this Tag's parent.
:param previous: The PageElement that was parsed immediately before
this tag.
:param is_xml: If True, this is an XML tag. Otherwise, this is an
HTML tag.
:param sourceline: The line number where this tag was found in its
source document.
:param sourcepos: The character position within `sourceline` where this
tag was found.
:param can_be_empty_element: If True, this tag should be
represented as <tag/>. If False, this tag should be represented
as <tag></tag>.
:param cdata_list_attributes: A list of attributes whose values should
be treated as CDATA if they ever show up on this tag.
:param preserve_whitespace_tags: A list of tag names whose contents
should have their whitespace preserved.
:param interesting_string_types: This is a NavigableString
subclass or a tuple of them. When iterating over this
Tag's strings in methods like Tag.strings or Tag.get_text,
these are the types of strings that are interesting enough
to be considered. The default is to consider
NavigableString and CData the only interesting string
subtypes.
:param namespaces: A dictionary mapping currently active
namespace prefixes to URIs. This can be used later to
construct CSS selectors.
Nz%No value provided for new tag's name.F)<19> parser_classrrnr&r'<00> _namespacesr%<00>store_line_numbers<72>
sourceline<EFBFBD> sourcepos<6F>cdata_list_attributes<65>$_replace_cdata_list_attribute_values<65>dictrYrZr<>rLrM<00>hidden<65>can_be_empty_element<6E>preserve_whitespace_tags<67>interesting_string_types<65>set_up_substitutions<6E>string_containersr )r <00>parser<65>builderr&r'r%r<>rGr<>rYr*r+r0r,r1r2<00>
namespacesrrr<00>__init__<5F>sX+

<02><02><06>

 

 
  z Tag.__init__r'cCstt|<00>d|j|j|j|j|j|j|j|j|j |j
|j d<02> }dD] }t ||t ||<02><02>q|jD] }|<01>|<03><10><00>q.|S)z<>A copy of a Tag is a new Tag, unconnected to the parse tree.
Its contents are a copy of the old Tag's contents.
N)rYr*r+r0r,r1)r0r/)r<>r6r&r'r%r<>rVr*r+r0r,r1rr
rLr~r<>)r <00>clonerr|rrrr<>s <06>
z Tag.__copy__cCst|j<01>dko |jS)a7Is this tag an empty-element tag? (aka a self-closing tag)
A tag that has contents is never an empty-element tag.
A tag that has no contents may or may not be an empty-element
tag. It depends on the builder used to create the tag. If the
builder has a designated list of empty-element tags, then only
a tag whose name shows up in that list is considered an
empty-element tag.
If the builder has no designated list of empty-element tags,
then any tag with no contents is an empty-element tag.
r)rorLr0r rrr<00>is_empty_element%szTag.is_empty_elementcCs0t|j<01>dkr dS|jd}t|t<03>r|S|jS)a<>Convenience property to get the single string within this
PageElement.
TODO It might make sense to have NavigableString.string return
itself.
:return: If this element has a single string child, return
value is that string. If this element has one child tag,
return value is the 'string' attribute of the child tag,
recursively. If this element is itself a string, has no
children, or has more than one child, return value is None.
r=Nr)rorLrNr<>r`)r r|rrrr`7s 

z
Tag.stringcCs|<00><00>|<00>|<01>|<01><01>dS)z2Replace this PageElement's contents with `string`.N)<03>clearr~rr_rrrr`LsFccs<><00>||jur |j}|jD]4}|durt|t<04>sq t|<03>}t|t<05>r'||ur&q n |dur0||vr0q |r=|<03><06>}t|<03>dkr=q |Vq dS)a|Yield all strings of certain classes, possibly stripping them.
:param strip: If True, all strings will be stripped before being
yielded.
:param types: A tuple of NavigableString subclasses. Any strings of
a subclass not found in this list will be ignored. By
default, the subclasses considered are the ones found in
self.interesting_string_types. If that's not specified,
only NavigableString and CData objects will be
considered. That means no comments, processing
instructions, etc.
:yield: A sequence of strings.
Nr)r<>r2<00> descendantsrNr<>r<>r\ro)r r\r]<00>
descendant<EFBFBD>descendant_typerrrr^Ss&<02>


<02> <04>zTag._all_stringscCsD|<00><00>|}|dur |j}|j<02><03>g|_d|_|}|dus
dSdS)a<>Recursively destroys this PageElement and its children.
This element will be removed from the tree and wiped out; so
will everything beneath it.
The behavior of a decomposed PageElement is undefined and you
should never use one for anything, but if you need to _check_
whether an element has been decomposed, you can use the
`decomposed` property.
NT)rrrI<00>__dict__r;rLr<>)r r<><00>nrrr<00> decomposeys 
<10>z Tag.decomposecCsX|r|jdd<01>D]}t|t<02>r|<02><03>q |<02><04>q dS|jdd<01>D]}|<02><04>q#dS)z<>Wipe out all children of this PageElement by calling extract()
on them.
:param decompose: If this is True, decompose() (a more
destructive method) will be called instead of extract().
N)rLrNr<>rArr)r rAr<>rrrr;<00>s


<04>
<04>z Tag.clearcCs<>g}t|j<01>D]7\}}t|t<03>r|<03><04>|t|j<01>dkrq|j|d}t|t<06>r>t|t<06>r>t|t<07>s>t|t<07>s>|<01>|<02>qt |<01>D]}|j|}|j|d}|<04>
<EFBFBD>t||<00>}|<03> |<05>qCdS)z<>Smooth out this element's children by consolidating consecutive
strings.
This makes pretty-printed output look more natural following a
lot of operations that modified the tree.
r=N) rsrLrNr<><00>smoothror<>rr~rzrrry)r <00>markedr<64><00>a<>br@rrrrB<00>s. 

<02><02><02>
<02> 
  <04>z
Tag.smoothcCs,t|j<01>D] \}}||ur|Sqtd<01><01>)z<>Find the index of a child by identity, not value.
Avoids issues with tag.contents.index(element) getting the
index of equal elements.
:param element: Look for this PageElement in `self.contents`.
zTag.index: element not in tag)rsrLrn)r r<>r<>r|rrrrq<00>s
<02>z Tag.indexcCs|j<00>||<02>S)z<>Returns the value of the 'key' attribute for the tag, or
the value given for 'default' if it doesn't have that
attribute.)r<><00>get)r <00>keyr<79>rrrrF<00>szTag.getcCs |<00>||<02>}t|t<02>s|g}|S)a&The same as get(), but always returns a list.
:param key: The attribute to look for.
:param default: Use this value if the attribute is not present
on this PageElement.
:return: A list of values, probably containing only a single
value.
)rFrNr<>)r rGr<>r<>rrr<00>get_attribute_list<73>s
zTag.get_attribute_listcC<00>
||jvS)z<Does this PageElement have an attribute with the given name?<3F>r<><00>r rGrrr<00>has_attr<74>rz Tag.has_attrcCs t|<00><01><01>Sr)r#<00>__hash__r rrrrM<00>s z Tag.__hash__cCs
|j|S)zqtag[key] returns the value of the 'key' attribute for the Tag,
and throws an exception if it's not there.rJrKrrr<00> __getitem__<5F><00>
zTag.__getitem__cC<00>
t|j<01>S)z0Iterating over a Tag iterates over its contents.<2E><02>iterrLr rrr<00>__iter__<5F>rz Tag.__iter__cCrP)z:The length of a Tag is the length of its list of contents.)rorLr rrr<00>__len__<5F>rz Tag.__len__cCrIr)rL)r rirrr<00> __contains__<5F>rzTag.__contains__cCr
)z-A tag is non-None even if it has no contents.Trr rrr<00>__bool__<5F>sz Tag.__bool__cCs||j|<dS)zKSetting tag[key] sets the value of the 'key' attribute for the
tag.NrJ)r rGr<>rrr<00> __setitem__szTag.__setitem__cCs|j<00>|d<01>dS)z;Deleting tag[key] deletes all 'key' attributes for the tag.N)r<>r<>rKrrr<00> __delitem__szTag.__delitem__cOs|j|i|<02><01>S)z<>Calling a Tag like a function is the same as calling its
find_all() method. Eg. tag('a') returns a list of all the A tags
found within this tag.<2E><01>find_all)r rur<>rrr<00>__call__ sz Tag.__call__cCspt|<01>dkr!|<01>d<02>r!|dd<04>}t<02>dt|d<06>t<05>|<00>|<02>S|<01>d<07>s/|dks/|<00>|<01>Std |j |f<00><01>)
zACalling tag.subtag is the same as calling tag.find(name="subtag")<29>r<>N<><4E><EFBFBD><EFBFBD><EFBFBD>z<EFBFBD>.%(name)sTag is deprecated, use .find("%(name)s") instead. If you really were looking for a tag called %(name)sTag, use .find("%(name)sTag"))r&<00>__rLr)
ro<00>endswithr<68>r<>r.r<><00>find<6E>
startswithrr)r r<><00>tag_namerrrrs <06><04>

 <04>zTag.__getattr__cCs<>||urdSt|d<02>r)t|d<03>r)t|d<04>r)|j|jks)|j|jks)t|<00>t|<01>kr+dSt|j<05>D]\}}||j|kr>dSq0dS)zyReturns true iff this Tag has the same name, the same attributes,
and the same contents (recursively) as `other`.Tr&r<>rLF)r<>r&r<>rorsrL)r <00>otherr<72><00>my_childrrr<00>__eq__"s&
<02><02>
<02>
<02><02><02>z
Tag.__eq__cCs
||k S)zTReturns true iff this Tag is not identical to `other`,
as defined in __eq__.r)r rcrrr<00>__ne__3rOz
Tag.__ne__rcC<00>|<00><00>S)z<>Renders this PageElement as a string.
:param encoding: The encoding to use (Python 2 only).
TODO: This is now ignored and a warning should be issued
if a value is provided.
:return: A (Unicode) string.
<20><01>decoder6rrr<00>__repr__8s z Tag.__repr__cCrg)z-Renders this PageElement as a Unicode string.rhr rrr<00> __unicode__CszTag.__unicode__r<00>xmlcharrefreplacecCs|<00>|||<03>}|<05>||<04>S)aRender a bytestring representation of this PageElement and its
contents.
:param encoding: The destination encoding.
:param indent_level: Each line of the rendering will be
indented this many levels. (The formatter decides what a
'level' means in terms of spaces or other characters
output.) Used internally in recursive calls while
pretty-printing.
:param formatter: A Formatter object, or a string naming one of
the standard formatters.
:param errors: An error handling strategy such as
'xmlcharrefreplace'. This value is passed along into
encode() and its value should be one of the constants
defined by Python.
:return: A bytestring.
<20>rir8)r r7<00> indent_levelrR<00>errorsr<73>rrrr8Is z
Tag.encodecCst|t<01>s
|<00>|<03>}|<03>|<00>}g}|D]H\}}|dur|}n8t|t<04>s(t|t<05>r.d<02>|<07>}nt|t<07>s8t|<07>}nt|t<08>rF|durF|<07> |<02>}|<03>
|<07>} t|<06>d|<03> | <09>}|<05> |<08>qd}
d} d} |j rj|j d} |jrs|jpqd}
nd| |jf} |<00>|<01>} d}d}|dur<>|j|d}| r<>|}|d}nd}|<00>|||<03>}|jr<>|}|Sg}d}|r<>dd<02>|<05>}|dur<>|<12> |<0F>|<12> d| |j||
f<00>| r<>|<12> d <09>|<12> |<11>| r<>|r<>|d
d kr<>|<12> d <09>| r<>| r<>|<12> |<0E>|<12> | <0B>|du<01>r| <0B>r|j<15>r|<12> d <09>d<04>|<12>}|S) a<>Render a Unicode representation of this PageElement and its
contents.
:param indent_level: Each line of the rendering will be
indented this many spaces. Used internally in
recursive calls while pretty-printing.
:param eventual_encoding: The tag is destined to be
encoded into this encoding. This method is _not_
responsible for performing that encoding. This information
is passed in so that it can be substituted in if the
document contains a <META> tag that mentions the document's
encoding.
:param formatter: A Formatter object, or a string naming one of
the standard formatters.
N<> <20>=r4r"z</%s%s>r=z
<%s%s%s%s><3E>
rF)rNrrO<00>
attributesr<EFBFBD><00>tuplerdr#r0r8<00>attribute_value<75>quoted_attribute_valuer~r%r:<00>void_element_close_prefixr&<00>_should_pretty_print<6E>indent<6E>decode_contentsr/rJ)r rn<00>eventual_encodingrRrsr<>rG<00>val<61>decodedr<64><00>close<73>closeTagr%<00> pretty_print<6E>space<63> indent_space<63>indent_contentsrLrQ<00>attribute_stringrrrrics<>


  

<02><02>


<02><02> 
 

<04><04>

<08>






z
Tag.decodecCs|duo |j p |j|jvS)z<>Should this tag be pretty-printed?
Most of them should, but some (such as <pre> in HTML
documents) should not.
N)r1r&)r rnrrrrx<00>s
<02>zTag._should_pretty_printcCs&|dur |jd|d<03>S|j|d|d<03>S)aPretty-print this PageElement as a string.
:param encoding: The eventual encoding of the string. If this is None,
a Unicode string will be returned.
:param formatter: A Formatter object, or a string naming one of
the standard formatters.
:return: A Unicode string (if encoding==None) or a bytestring
(otherwise).
NT)rRrm)r r7rRrrr<00>prettify<66>s
z Tag.prettifyc Cs<>t|t<01>s
|<00>|<03>}|du}g}|D]O}d}t|t<03>r!|<06>|<03>}nt|t<05>r0|<05>|<06>|||<03><03>|jo8|j |jv}|rC|rC|sC|<07>
<EFBFBD>}|ra|rS|sS|<05>|j |d<00>|<05>|<07>|ra|sa|<05>d<03>qd<04> |<05>S)a,Renders the contents of this tag as a Unicode string.
:param indent_level: Each line of the rendering will be
indented this many levels. (The formatter decides what a
'level' means in terms of spaces or other characters
output.) Used internally in recursive calls while
pretty-printing.
:param eventual_encoding: The tag is destined to be
encoded into this encoding. decode_contents() is _not_
responsible for performing that encoding. This information
is passed in so that it can be substituted in if the
document contains a <META> tag that mentions the document's
encoding.
:param formatter: A Formatter object, or a string naming one of
the standard Formatters.
Nr=rrr4) rNrrOr<>r r<>r~rir1r&r\ryrd) r rnr{rRr<>rQrXr<><00>preserve_whitespacerrrrz<00>s0


 
 <06><02> 

<02>
zTag.decode_contentscCs|<00>|||<03>}|<04>|<02>S)a:Renders the contents of this PageElement as a bytestring.
:param indent_level: Each line of the rendering will be
indented this many levels. (The formatter decides what a
'level' means in terms of spaces or other characters
output.) Used internally in recursive calls while
pretty-printing.
:param eventual_encoding: The bytestring will be in this encoding.
:param formatter: A Formatter object, or a string naming one of
the standard Formatters.
:return: A bytestring.
)rzr8)r rnr7rRrLrrr<00>encode_contentss
zTag.encode_contentsrcCs|sd}|j||d<02>S)z(Deprecated method for BS3 compatibility.N)rnr7)r<>)r r7<00> prettyPrint<6E> indentLevelrrr<00>renderContents,s
<06>zTag.renderContentsTcKs.d}|j||||dfi|<05><01>}|r|d}|S)aLook in the children of this PageElement and find the first
PageElement that matches the given criteria.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param recursive: If this is True, find() will perform a
recursive search of this PageElement's children. Otherwise,
only the direct children will be considered.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A PageElement.
:rtype: bs4.element.Tag | bs4.element.NavigableString
Nr=rrY)r r&r<><00> recursiver`r<>r<>r<>rrrr`6s
zTag.findcKs*|j}|s|j}|j|||||fi|<06><01>S)a<>Look in the children of this PageElement and find all
PageElements that match the given criteria.
All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param recursive: If this is True, find_all() will perform a
recursive search of this PageElement's children. Otherwise,
only the direct children will be considered.
:param limit: Stop looking after finding this many results.
:kwargs: A dictionary of filters on attribute values.
:return: A ResultSet of PageElements.
:rtype: bs4.element.ResultSet
)r<<00>childrenr<6E>)r r&r<>r<>r`r<>r<>r<>rrrrZOsz Tag.find_allcCrP)zkIterate over all direct children of this PageElement.
:yield: A sequence of PageElements.
rQr rrrr<>is
z Tag.childrenccsH<00>t|j<01>sdS|<00><02>j}|jd}||ur"|V|j}||usdSdS)z<>Iterate over all children of this PageElement in a
breadth-first sequence.
:yield: A sequence of PageElements.
Nr)rorLr<>rI)r <00>stopNode<64>currentrrrr<rs<02>


<10>zTag.descendantscKs&|j||dfi|<03><01>}|r|dSdS)aPerform a CSS selection operation on the current element.
:param selector: A CSS selector.
:param namespaces: A dictionary mapping namespace prefixes
used in the CSS selector to namespace URIs. By default,
Beautiful Soup will use the prefixes it encountered while
parsing the document.
:param kwargs: Keyword arguments to be passed into SoupSieve's
soupsieve.select() method.
:return: A Tag.
:rtype: bs4.element.Tag
r=rN)<01>select)r <00>selectorr7r<>r<>rrr<00>
select_one<EFBFBD>szTag.select_onecKsL|dur|j}|dur d}tdurtd<03><01>tj||||fi|<04><01>}td|<05>S)a<>Perform a CSS selection operation on the current element.
This uses the SoupSieve library.
:param selector: A string containing a CSS selector.
:param namespaces: A dictionary mapping namespace prefixes
used in the CSS selector to namespace URIs. By default,
Beautiful Soup will use the prefixes it encountered while
parsing the document.
:param limit: After finding this number of results, stop looking.
:param kwargs: Keyword arguments to be passed into SoupSieve's
soupsieve.select() method.
:return: A ResultSet of Tags.
:rtype: bs4.element.ResultSet
NrzLCannot execute CSS selectors because the soupsieve package is not installed.)r(<00> soupsiever[r<>r<>)r r<>r7r<>r<>r<>rrrr<><00>s<04>
z
Tag.selectcCr<><00>zDeprecated generator.)r<>r rrr<00>childGenerator<6F><00>zTag.childGeneratorcCr<>r<>)r<r rrr<00>recursiveChildGenerator<6F>r<>zTag.recursiveChildGeneratorcCst<00>dt<02>|<00>|<01>S)z<>Deprecated method. This was kind of misleading because has_key()
(attributes) was different from __in__ (contents).
has_key() is gone in Python 3, anyway.
z1has_key is deprecated. Use has_attr(key) instead.)r<>r<>r<>rLrKrrr<00>has_key<65>s
<04>
z Tag.has_key)NNNNNNNNNNNNNNNN)Fr)r)Nrr*)>r+r,r-r.r8r<00> parserClassr<73>rr:<00> isSelfClosingr`rr<>rr rEr<>r^rrAr;rBrqrFrHrLrMrNrSrTrUrVrWrXr[rrerfrjrk<00>__str__r<5F>r8rirxr<>rzr<>r<>r`<00> findChildrZ<00>findAll<6C> findChildrenr<6E>r<r<>r<>r<>r<>r<>rrrrr<><00>s<>
<EFBFBD>u


$
&

 
<EFBFBD>
<EFBFBD>e

<EFBFBD>2
<EFBFBD>
<EFBFBD>

<EFBFBD>



% r<>c@sTeZdZdZdidfdd<04>Zdd<06>Zdd<08>Zdifd d
<EFBFBD>ZeZd d <0C>Z dd d<0E>Z
dS)r<>a&Encapsulates a number of ways of matching a markup element (tag or
string).
This is primarily used to underpin the find_* methods, but you can
create one yourself and pass it in as `parse_only` to the
`BeautifulSoup` constructor, to parse a subset of a large
document.
NcKs<>|durd|vr|<04>d<02>}t<01>dt<03>|<00>|<01>|_t|t<07>s$||d<d}d|vr1|d|d<|d=|rA|r?|<02><08>}|<02> |<04>n|}i}t
|<02> <0B><00>D] \}}|<00>|<07>||<qI||_ |<00>|<03>|_ |j |_dS)a<>Constructor.
The SoupStrainer constructor takes the same arguments passed
into the find_* methods. See the online documentation for
detailed explanations.
:param name: A filter on tag name.
:param attrs: A dictionary of filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:kwargs: A dictionary of filters on attribute values.
Nr<4E>zXThe 'text' argument to the SoupStrainer constructor is deprecated. Use 'string' instead.<2E>class<73>class_)r<>r<>r<>r<><00>_normalize_search_valuer&rNr.<00>copy<70>updater<65><00>itemsr<73>r`r<>)r r&r<>r`r<><00>normalized_attrsrGr<>rrrr8<00>s0
<04> 
    zSoupStrainer.__init__cCs<>t|t<01>st|t<02>st|d<01>st|t<04>s|dur|St|t<05>r$|<01>d<02>St|d<03>rOg}|D]}t|d<03>rDt|t<05>sDt|t<01>sD|<02>|<03>q-|<02>|<00>|<03><01>q-|Stt|<01><01>S)Nr<<00>utf8rS) rNr#rr<><00>bool<6F>bytesrir~r<>)r r<><00> new_value<75>vrrrr<> s$<02><02>


<02>  z$SoupStrainer._normalize_search_valuecCs|jr|jSd|j|jfS)z5A human-readable representation of this SoupStrainer.z%s|%s)r`r&r<>r rrrr<>)szSoupStrainer.__str__c Cs8d}d}t|t<01>r |}|}t|jt<03>r |r |js |j|jkr dSt|jt<05>o+t|t<01> }|jrC|sC|r:|<00>||j<02>sC|s<>|<00>||j<02>r<>|rL|<00>||<02>}n6d}d}t|j<08> <09><00>D]*\}} |srt
|d<04>re|}n i}|D]\}
} | ||
<qi|<07> |<08>} |<00>| | <09>s<>d}nqW|r<>|r<>|}n|}|r<>|j r<>|<00>|j |j <0C>s<>d}|S)a<>Check whether a Tag with the given name and attributes would
match this SoupStrainer.
Used prospectively to decide whether to even bother creating a Tag
object.
:param markup_name: A tag name as found in some markup.
:param markup_attrs: A dictionary of attributes as found in some markup.
:return: True if the prospective tag would match this SoupStrainer;
False otherwise.
NFTrF) rNr<>r&r#r%r<00>_matchesr<73>r<>r<>r<>rFr`) r <00> markup_name<6D> markup_attrsr<73><00>markup<75>call_function_with_tag_datar<<00>markup_attr_mapr<00> match_against<73>kr<6B><00>
attr_valuerrr<00>
search_tag0sZ 
  
<02><02><02> <02><02> <02>
 

 <02>zSoupStrainer.search_tagcCs<>d}t|d<02>r$t|ttf<02>s$|D]}t|t<04>r!|<00>|<03>r!|}|Sq|St|t<02>r9|jr2|js2|jr7|<00> |<01>}|St|t<04>sCt|t<03>rT|jsR|jsR|<00>
||j<06>rR|}|St d|j <00><01>)z<>Find all items in `markup` that match this SoupStrainer.
Used by the core _find_all() method, which is ultimately
called by all find_* methods.
:param markup: A PageElement or a list of them.
NrSz&I don't know how to match against a %s) r<>rNr<>r#r<>r;r`r&r<>r<>r<><00> Exceptionr)r r<>r<>r<>rrrr;os0 
<02><02>
<EFBFBD>

<EFBFBD><02><02><04>zSoupStrainer.searchc Csfd}t|t<01>s t|t<02>r'|D] }|<00>||<02>rdSq|<00>d<03>|<01>|<02>r%dSdS|dur/|duSt|t<05>r8||<01>S|}t|t<06>rB|j}|<00>|<01>}|durN| St |d<04>r<>t|t
<EFBFBD>s<>|s]t <0B>}|D] }|j rg|}nt |<05>}||vrpq_|<03>|<07>|<00>|||<03>rdSq_dSd}|s<>t|t
<EFBFBD>r<>||k}|s<>t |d<05>r<>|<02>|<01>S|s<>t|t<06>r<>|jr<>|<00>|jd|j|<02>S|S)NFTrprSr;r")rNr<>rtr<>rdrr<>r&r<>r<>r#<00>setrM<00>id<69>addr;r%) r r<>r<><00> already_triedr<64><00>item<65>original_markuprGr<rrrr<><00>sb <02>



<02>
<02>
<02><02><04>zSoupStrainer._matchesr) r+r,r-r.r8r<>r<>r<><00> searchTagr;r<>rrrrr<><00>s 0=!r<>cs*eZdZdZd<07>fdd<04> Zdd<06>Z<05>ZS)r<>zTA ResultSet is just a list that keeps track of the SoupStrainer
that created it.rcstt|<00><02>|<02>||_dS)zlConstructor.
:param source: A SoupStrainer.
:param result: A list of PageElements.
N)<04>superr<72>r8<00>source)r r<>r<><00>rrrr8<00>s
zResultSet.__init__cCs td|<00><01>)z7Raise a helpful exception to explain a common code fix.z<>ResultSet object has no attribute '%s'. You're probably treating a list of elements like a single element. Did you call find_all() when you meant to call find()?r rKrrrr<00>s<04>zResultSet.__getattr__)r)r+r,r-r.r8r<00> __classcell__rrr<>rr<><00>s r<>).<2E> __license__<5F>collections.abcr<00> ImportError<6F>e<> collectionsrB<00>sysr<73>r<>r<><00> bs4.formatterrrrr<>rC<00>nonwhitespace_re<72> whitespace_rerr<>r5r#r!r0r2r9r<>rEr<>rrrrrrrr!r#r$r%r&r<>r<>r<>r<>rrrr<00><module>sx<08><02> <10><08><02>

 y     C