9,jRdZdZdZdZdZgdZddlmZddlZddl Z ddl Z e j j d kr e d d d lmZmZd d lmZd dlmZd dlmZd dlmZd dlmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'd dl(m)Z)d dl*m+Z+m,Z,ddl-m.Z.m/Z/mZ0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8ddl9m:Z:m;Z;mZ>m?Z?m@Z@ddlAmBZBmCZCmDZDddlEmFZFmGZGmHZHmIZImJZJGdde&ZKeKZLeKZMGddeKZNeOdkr3ddl Z eKe jPZQeReQSdSdS)afBeautiful Soup Elixir and Tonic - "The Screen-Scraper's Friend". http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides methods and Pythonic idioms that make it easy to navigate, search, and modify the parse tree. Beautiful Soup works with Python 3.7 and up. It works better if lxml and/or html5lib is installed, but they are not required. For more than you ever wanted to know about Beautiful Soup, see the documentation: http://www.crummy.com/software/BeautifulSoup/bs4/doc/ z*Leonard Richardson (leonardr@segfault.org)z4.15.0z*Copyright (c) 2004-2026 Leonard RichardsonMIT)!AttributeResemblesVariableWarning BeautifulSoupComment DeclarationProcessingInstruction ResultSetCSSScript StylesheetTagTemplateString ElementFilter UnicodeDammitCDataDoctypeFeatureNotFoundParserRejectedMarkup StopParsingrGuessedAtParserWarningMarkupResemblesLocatorWarningUnusualUsageWarningXMLParsedAsHTMLWarning)CounterNzYou are trying to use a Python 3-specific version of Beautiful Soup under Python 2. This will not work. The final version of Beautiful Soup to support Python 2 was 4.9.3.)builder_registry TreeBuilder)HTMLParserTreeBuilder)r)r ) _deprecated)rrDEFAULT_OUTPUT_ENCODINGrrNavigableString PageElementrPYTHON_SPECIFIC_ENCODINGSrr r r r ) Formatter)r SoupStrainer) AnycastrDictIteratorListSequenceSizedOptionalTypeUnion) _Encoding _Encodings_IncomingMarkup_InsertableElement_RawAttributeValue_RawAttributeValues _RawMarkup)rrr)rrrrrceZdZUdZdZeed<ddgZeeed<dZ eed<e e e e e fed <e ed <eed <eeed <eeed <eeed<eeed<eeed<eeed<eeed<eeed<eeed<ee ed<eeed<eeed<eed< dXdedeeeeefd eee e e fd eedeedeed ee e e e e fdefdZdYd!Zd e eeffd"Zd#e eefd dfd$Zed%Ze e!d&d'(ded efd)Z"e ded efd*Z#e ded efd+Z$dZd,Z%dZd-Z& d[d.ed/eed0eed1ee'd2ee(d3ee(d4eed5e)d efd6Z* d\d7ee e+d e e+fd8Z, d\d9ed:ee e+d e+fd;Z-dZ0d eefd?Z1d@ed dfdAZ2d\dBee e+d dfdCZ3 d]dDe dEeedFee d dfdGZ4dHed dfdIZ5 d^d.ed0eedKed eefdLZ6 d_d.ed/eed0eed1e'd2ee(d3ee(dMee eefd eefdNZ7d\d.ed0eed dfdOZ8dPed dfdQZ9de:dRdfdSee(dTedUee;efdVeeS)`raA data structure representing a parsed HTML or XML document. Most of the methods you'll call on a BeautifulSoup object are inherited from PageElement or Tag. Internally, this class defines the basic interface called by the tree builders when converting an HTML/XML document into a data structure. The interface abstracts away the differences between parsers. To write a new tree builder, you'll need to understand these methods as a whole. These methods will be called by the BeautifulSoup constructor: * reset() * feed(markup) The tree builder may call these methods from its feed() implementation: * handle_starttag(name, attrs) # See note about return value * handle_endtag(name) * handle_data(data) # Appends to the current data node * endData(containerClass) # Ends the current data node No matter how complicated the underlying parser is, you should be able to build a tree using 'start tag' events, 'end tag' events, 'data' events, and "done with data" events. If you encounter an empty-element tag (aka a self-closing tag, like HTML's
tag), call handle_starttag and then handle_endtag. z [document] ROOT_TAG_NAMEhtmlfastDEFAULT_BUILDER_FEATURESz ASCII_SPACESelement_classesbuilderis_xml known_xml parse_onlymarkup current_data currentTagtagStackopen_tag_counterpreserve_whitespace_tag_stackstring_container_stack_most_recent_elementoriginal_encodingdeclared_html_encodingcontains_replacement_charactersNfeatures from_encodingexclude_encodingskwargsc dvrd=tjddvrd=tjddvrd=tjddvrd=tjdd vrd =tjd d td td ttffd } |p | dd}|&|jrtjd|t d|p | dd}|r+t|trtjdd}|p t|_ |} |} d} t|tr|} d}nm|kt|tr|g}|t|dkr|j }tj|} | %tdd|z| } || J| d3i}| s | |jkst| tr | |jvs|r|jrd}nd}d} t)jd}n#t,$rYnwxYw|r|j}|j}nt(j}d}|d}|r3|}|dr |dd }|rAt|||j|!}tjt:j|zt:d"nrtjd#||_|j|_|j|_ t|_!||_"tG|d$r-tItJj&|'}nt|tPtfs#tG|d%stSd&|d't|tTrwt|d(krdt|tPrd)|vrd*|vst|tr2d+|vr.d,|vr*|+|s|,|tItZ|}g}d-}|j.|||.D]\|_/|_0|_1|_2|3|j4| |5d/}n,#tl$r}|7|Yd}~d}~wwxYw|s1d0|D}tmd1d2|zd|_/d|j_8dS)4a Constructor. :param markup: A string or a file-like object representing markup to be parsed. :param features: Desirable features of the parser to be used. This may be the name of a specific parser ("lxml", "lxml-xml", "html.parser", or "html5lib") or it may be the type of markup to be used ("html", "html5", "xml"). It's recommended that you name a specific parser, so that Beautiful Soup gives you the same results across platforms and virtual environments. :param builder: A TreeBuilder subclass to instantiate (or instance to use) instead of looking one up based on `features`. You only need to use this if you've implemented a custom TreeBuilder. :param parse_only: A SoupStrainer. Only parts of the document matching the SoupStrainer will be considered. This is useful when parsing part of a document that would otherwise be too large to fit into memory. :param from_encoding: A string indicating the encoding of the document to be parsed. Pass this in if Beautiful Soup is guessing wrongly about the document's encoding. :param exclude_encodings: A list of strings indicating encodings known to be wrong. Pass this in if you don't know the document's encoding but you know Beautiful Soup's guess is wrong. :param element_classes: A dictionary mapping BeautifulSoup classes like Tag and NavigableString, to other classes you'd like to be instantiated instead as the parse tree is built. This is useful for subclassing Tag or NavigableString to modify default behavior. :param kwargs: For backwards compatibility purposes, the constructor accepts certain keyword arguments used in Beautiful Soup 3. None of these arguments do anything in Beautiful Soup 4; they will result in a warning and then be ignored. Apart from this, any keyword arguments passed into the BeautifulSoup constructor are propagated to the TreeBuilder constructor. This makes it possible to configure a TreeBuilder by passing in arguments, not just by saying which one to use. convertEntitieszBS4 does not respect the convertEntities argument to the BeautifulSoup constructor. Entities are always converted to Unicode characters. markupMassagezBS4 does not respect the markupMassage argument to the BeautifulSoup constructor. The tree builder is responsible for any necessary markup massage. smartQuotesTozBS4 does not respect the smartQuotesTo argument to the BeautifulSoup constructor. Smart quotes are always converted to Unicode characters.selfClosingTagszBeautiful Soup 4 does not respect the selfClosingTags argument to the BeautifulSoup constructor. The tree builder is responsible for understanding self-closing tags.isHTMLzBeautiful Soup 4 does not respect the isHTML argument to the BeautifulSoup constructor. Suggest you use features='lxml' for HTML and features='lxml-xml' for XML.old_namenew_namereturnc|vr8tjd|d|dtd|SdS)NzThe "z<" argument to the BeautifulSoup constructor was renamed to "z" in Beautiful Soup 4.0.0r stacklevel)warningswarnDeprecationWarningpop)rYrZrRs .deprecated_argument9s^6!!  xx+' zz(+++4parseOnlyTheserBNz8The given value for parse_only will exclude everything: rr] fromEncodingrPzlYou provided Unicode markup but also provided a value for from_encoding. Your from_encoding will be ignored.rzjCouldn't find a tree builder with the features you requested: %s. Do you need to install a parser library?,XMLHTMLr__file__)z.pycz.pyo)filename line_numberparser markup_typezKeyword arguments to the BeautifulSoup constructor will be ignored. These would normally be passed into the TreeBuilder constructor, but a TreeBuilder instance was passed in as `builder`.read__len__z'Incoming markup is of an invalid type: z?. Markup must be a string, a bytestring, or an open filehandle.< < F)rQTc,g|]}t|S)str).0es rc z*BeautifulSoup.__init__..s;;;1A;;;rezThe markup you provided was rejected by the parser. Trying a different parser or a different encoding may help. Original exception(s) from parser: z rz)9r_r`r{r.r'excludes_everything UserWarning isinstancedictr>typelenr<rlookuprjoinNAMEALTERNATE_NAMESr@sys _getframe ValueError f_globalsf_lineno__dict__getlowerendswithrMESSAGEr?rA _namespacesrBhasattrr(ioIOBaserrbytes TypeErrorr-_markup_is_url_markup_resembles_filenamer7prepare_markuprCrKrLrMresetinitialize_soup_feedrappendsoup)selfrCrOr?rBrPrQr>rRrdoriginal_builderoriginal_features builder_classpossible_builder_classrpcallerglobalsrnrmfnlvalues rejectionssuccessr}other_exceptionss ` rc__init__zBeautifulSoup.__init__sz  & &() M)    f $ $' M4    f $ $' M)     & &() M7    v  x M    #  #       V#6#67G#V#V  !-  [z[[  & )<)< O* *   !Z44 ! M~   !M.8$&& #$59 gt $ $ 3#MGG _(C(( &$:3x==A#5#58%5%)"'KK"(K  ]1--FF!D$$.G"(/KK!lG"#K";;z221"..**C||$4551#+CRC= "!)$/&|$/ F M.6?.#$   R n 66$ 66 " " 8")V,,1133FFFUCL11 8'&):T:T 8D&DDD  & & 83v;;#+=+=  & &,>+/v+=+=%vBUBU63''CV,/v,=,=$fBTBT &&v.. 8//777j&))  \ ( ( M5F)     K  "  '  0 JJLLL L ( ( . . .  '   !!!$$$  ;; ;;; &k**-../    s*H$$ H10H18S S9S44S9r[c\t|dd|j}|j|_|S)zCreate a new BeautifulSoup object with the same TreeBuilder, but not associated with any markup. This is the first step of the deepcopy process. rNN)rr?rK)rclones rc copy_selfzBeautifulSoup.copy_selfs1 T 2tT\22#'"8 rect|j}d|vr+|d#|jjst |j|d<g|d<||d<d|vr|d=|S)Nr?contentsrCrJ)rrr? picklablerdecode)rds rc __getstate__zBeautifulSoup.__getstate__su    >>a l6t|?U6 --AiL* kkmm( "Q & &()restatec||_t|jtr||_n|jst |_||j_||dSN)rrr?rrrrr)rrs rc __setstate__zBeautifulSoup.__setstate__ so dlD ) ) 3<<>>DLL 3122DL    recdS)zfYes, a BeautifulSoup object is the root of its parse tree. Used by the _root_object internal property.Trzrs rc_is_rootzBeautifulSoup._is_roots trez)nothing (private method, will be removed)z4.13.0) replaced_byversioncbt|tr|dd}n|}|S)aEnsure `markup` is Unicode so it's safe to send into warnings.warn. warnings.warn had this problem back in 2010 but fortunately not anymore. This has not been used for a long time; I just noticed that fact while working on 4.13.0. zutf-8replace)rrr)clsrCdecodeds rc_decode_markupzBeautifulSoup._decode_markups5 fe $ $ mmGY77GGGrecZd}ttr tfddDodv}n7ttr tfddDodv}ndS|sdSt jt jtd zt d d S) zError-handling method to raise a warning if incoming markup looks like a URL. :param markup: A string of markup. :return: Whether or not the markup resembled a URL closely enough to justify issuing a warning. Fc3BK|]}|VdSr startswithr|prefixrCs rc z/BeautifulSoup._markup_is_url..;s1RR&F%%f--RRRRRRre)shttp:shttps: c3BK|]}|VdSrrrs rcrz/BeautifulSoup._markup_is_url..@s1PP&F%%f--PPPPPPre)zhttp:zhttps: URLwhatrr]T) rranyr{r_r`r URL_MESSAGEr)rrCproblems ` rcrzBeautifulSoup._markup_is_url/s fe $ $ RRRR.fs/99su~~c""999999reTs?*#&;>$|s//s :)rlrrmrrr]) rr{encoderrrrfindr_r`rFILENAME_MESSAGEr)rrCmarkup_bfilelike extensionsbytecolon_irs @rcrz(BeautifulSoup._markup_resembles_filenameOsM fc " " }}V,,HHH  EEE 9999j999 9 9 H 5  D{""uu# H  5 H  5   t $ $ 5..&& ' ! !5  ) :Tz=R=R=R R )    trecP|j|j|j|j||jG|jj|jkr6||j|jj|jk0dSdSdSdS)zInternal method that parses previously set markup, creating a large number of Tag and NavigableString objects. N) r?rrCfeedendDatarEnamer9popTagrs rcrzBeautifulSoup._feeds  ; " L  dk * * *  O 'DO,@DDV,V,V KKMMM O 'DO,@DDV,V,V,V,V ' ' ' ',V,Vrec,tj|||j|jd|_|jg|_d|_g|_t|_ g|_ g|_ d|_ ||dS)zWReset this object to a state as though it had never parsed any markup. TN)r rr?r9hiddenrrDrErFrrGrHrIrJpushTagrs rcrzBeautifulSoup.resets T4t/ABBB   ' -/*&(#$(! Trer namespacensprefixattrs sourceline sourceposstringkwattrsc $|jjdi|} || ||jt t } t tt | } | d|j|||| ||} ||| _| S)aDCreate a new Tag associated with this BeautifulSoup object. :param name: The name of the new Tag. :param namespace: The URI of the new Tag's XML namespace, if any. :param prefix: The prefix for the new Tag's XML namespace, if any. :param attrs: A dictionary of this Tag's attribute values; can be used instead of ``kwattrs`` for attributes like 'class' that are reserved words in Python. :param sourceline: The line number where this tag was (purportedly) found in its source document. :param sourcepos: The character position within ``sourceline`` where this tag was (purportedly) found. :param string: String content for the new Tag, if any. :param kwattrs: Keyword arguments for the new Tag's attribute values. N)rrrz) r?attribute_dict_classupdater>rr r(r/r) rrrrrrrrrattr_container tag_classtags rcnew_tagzBeautifulSoup.new_tags6;:EEWEE    ! !% ( ( ((,,S#66 cI.. i  L    !      CJ re base_classc |pt}ttt|j||}|jr9|tur0|jj|jdj|}|S)zFind the class that should be instantiated to hold a given kind of string. This may be a built-in Beautiful Soup class or a custom class passed in to the BeautifulSoup constructor. rl) r"r(r/r>rrIr?string_containersr)rr containers rcstring_containerzBeautifulSoup.string_containers1/   !4#7#;#;Iy#Q#Q   & 9+G+G 6::+B/4iIressubclasscB||}||S)aCreate a new `NavigableString` associated with this `BeautifulSoup` object. :param s: The string content of the `NavigableString` :param subclass: The subclass of `NavigableString`, if any, to use. If a document is being processed, an appropriate subclass for the current location in the document will be determined automatically. )r)rrrrs rc new_stringzBeautifulSoup.new_strings%))(33 y||reargsc td)This method is part of the PageElement API, but `BeautifulSoup` doesn't implement it because there is nothing before or after it in the parse tree. z4BeautifulSoup objects don't support insert_before().NotImplementedErrorrrs rc insert_beforezBeautifulSoup.insert_before s" B   rec td)rz3BeautifulSoup objects don't support insert_after().rrs rc insert_afterzBeautifulSoup.insert_afters""WXXXrec|jsdS|j}|j|jvr|j|jxxdzcc<|jr*||jdkr|j|jr*||jdkr|j|jr|jd|_|jS)zZInternal method called by _popToTag when a tag is closed. :meta private: Nrrl)rFrbrrGrHrIrErrs rcrzBeautifulSoup.popTags } 4m!! 8t, , ,  !#( + + +q 0 + + +  . 5t9"===  . 2 2 4 4 4  & .3$2Mb2Q+Q+Q  ' + + - - - = 0"mB/DOrerc|j|jj||j||jd|_|j|jkr|j|jxxdz cc<|j|jjvr|j ||j|jj vr|j |dSdS)z`Internal method called by handle_starttag when a tag is opened. :meta private: Nrlr) rErrrFrr9rGr?preserve_whitespace_tagsrHrrIr s rcrzBeautifulSoup.pushTag1s ? & O $ + +C 0 0 0 S!!!-+ 8t) ) )  !#( + + +q 0 + + + 8t|< < <  . 5 5c : : : 8t|5 5 5  ' . .s 3 3 3 3 3 6 5recontainerClassc|jrd|j}|jsd}|D]}||jvrd}n|r d|vrd}nd}g|_|jr4t |jdkr|j|sdS||}||}| |dSdS)zMethod called by the TreeBuilder when the end of a data segment occurs. :param containerClass: The class to use when incorporating the data segment into the parse tree. :meta private: rNTFrxrrN) rDrrHr=rBrrFallow_string_creationrobject_was_parsed)rrrD strippableios rcrzBeautifulSoup.endDataBs   &774#455L5 +! %A 111%* 2+|++'+ '* !#D   &&!++>>|LL,!22>BBN|,,A  " "1 % % % % %= & &rerparentmost_recent_elementcb||j}|J||}n|j}dx}x}}t|tr|j}|j}|j}||j}|jdu}||||||||_|j ||r| |dSdS)zuMethod called by the TreeBuilder to integrate an object into the parse tree. :meta private: N) rErJrr next_element next_siblingprevious_siblingprevious_elementsetuprr_linkage_fixer) rrrrrrrrfixs rcrzBeautifulSoup.object_was_parsedks >_F!!!  *2  #8 9== =', a   6>L>L 1 '#$#5 !- (,8H,WWW$%!q!!!  (    ' ' ' ' ' ( (reelc|jd}|jd}|}||ur0|j)||_|j}| ||urd|_||_d|_d|_t |tr/|jr(tt| d}d|_d|_|} |dS|j|j|_||j_dS|j}-)z,Make sure linkage of this fragment is sound.rrlNF) rrrrrrrr r(r#_last_descendant)rrfirstchild descendantprev_eltargets rcrzBeautifulSoup._linkage_fixers A B"' E>>bi3#BO,G"wb'8'8'+$%'E "%)E "" eS ! ! Jen Jk5+A+A%+H+HIIJ #' "&  " #~$0*0*= '7<#4]F #reT inclusivePopcP||jkrdSd}t|j}t|dz ddD]m}|j|snP|j|}||jkr#||jkr|r|}n|}n|S)aPops the tag stack up to and including the most recent instance of the given tag. If there are no open tags with the given name, nothing will be popped. :param name: Pop up to the most recent tag with this name. :param nsprefix: The namespace prefix that goes with `name`. :param inclusivePop: It this is false, pops the tag stack up to but *not* including the most recent instqance of the given tag. :meta private: Nrrrl) r9rrFrangerGrrrr)rrrr'most_recently_popped stack_sizerts rc _popToTagzBeautifulSoup._popToTags$ 4% % %4#'' zA~q"-- 1 1A(,,T22  a Aqv~~(ah"6"69+/;;==(#';;== ##re namespacesc ||jr6t|jdkr|j|||sdS|jtt}ttt|}|||j |||||j |j ||| } | | S|j | |j _ | |_ || | S)aCalled by the tree builder when a new tag is encountered. :param name: Name of the tag. :param nsprefix: Namespace prefix for the tag. :param attrs: A dictionary of attribute values. Note that attribute values are expected to be simple strings; processing of multi-valued attributes such as "class" comes later. :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 namespaces: A dictionary of all namespace prefix mappings currently in scope in the document. If this method returns None, the tag was rejected by an active `ElementFilter`. You should proceed as if the tag had not occurred in the document. For instance, if this was a self-closing tag, don't call handle_endtag. :meta private: rN)rrr.)rrBrrFallow_tag_creationr>rr r(r/r?rErJrr) rrrrrrrr.rrs rchandle_starttagzBeautifulSoup.handle_starttags@  O DM""a''O66xuMM(4(,,S#66 cI.. i  L     O  %!!     ;J  $ 058D % 2$'! S recZ||||dS)zCalled by the tree builder when an ending tag is encountered. :param name: Name of the tag. :param nsprefix: Namespace prefix for the tag. :meta private: N)rr-)rrrs rc handle_endtagzBeautifulSoup.handle_endtag%s+  tX&&&&&redatac:|j|dS)zpCalled by the tree builder when a chunk of textual data is encountered. :meta private: N)rDr)rr4s rc handle_datazBeautifulSoup.handle_data1s!   &&&&&reminimal indent_leveleventual_encoding formatteriteratorc |jrd}|}|tvrd}|d|z}d|z}nd}d} d} t|tr|durd}n|durd}d|d } n/|d d} |rJ| | durd}n| durd}d |d } | rt j| td n |dus| durd}|tt| ||||zS)aMReturns a string representation of the parse tree as a full HTML or XML document. :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.) This is used internally in recursive calls while pretty-printing. :param eventual_encoding: The encoding of the final document. If this is None, the document will be a Unicode string. :param formatter: Either a `Formatter` object, or a string naming one of the standard formatters. :param iterator: The iterator to use when navigating over the parse tree. This is only used by `Tag.decode_contents` and you probably won't need to use it. rNNz encoding="%s"z TrFzAs of 4.13.0, the first argument to BeautifulSoup.decode has been changed from bool to int, to match Tag.decode. Pass in a value of z instead. pretty_printzAs of 4.13.0, the pretty_print argument to BeautifulSoup.decode has been removed, to match Tag.decode. Pass in a value of indent_level=rqr]) r@r$rboolrbr_r`rasuperrr) rr8r9r:r;rR encoding_partdeclared_encodingrwarningr= __class__s rcrzBeautifulSoup.decode9s0 ; M/@  $===%)! , 03D D 0=@FFF"&'+ lD ) ) |t## &&# u^juuuGG!::nd;;L  :'4''#$LL!U**#'L|eq|||  M'#5! D D D D D U " "le&;&;LmT2299 +Y    re)rNNNNNNN)r[r)r[N)NNNNNNr)NN)NT)NNN)?__name__ __module__ __qualname____doc__r9r{__annotations__r<r,r=r)r/r#rr>r.r&r7r+r CounterTyper1r3r0r2r'rrrrpropertyr classmethodr rrrrrr6intr5rr"rrr4rr rrrrrr-r1r3r6r!r%r*r __classcell__rCs@rcrrsB&M3%%%06v.>hsm>>>/L#...${+T+->>????  LLL~&&&& Z    s) 3i!#&&&&#'9,,, I%%%";//// **** %Y//// &*)))#%8 >?@ Z! \* Z!  * Z!$J/Z!"$tK'8${:K'K"LMZ!Z!Z!Z!Z!x    d38n $sCx. T    X[? J 3   [ J4[>@ @t@@@[@D &$("&/3$(#' $000C=03- 0 +, 0 SM 0C=0 0&0 0000f=A"4#89 o 4CG    (o)> ?       #5 ${:K    Y"4Yk9JYYYY  .43444444"'&'&htO/D&E'&QU'&'&'&'&X!%59 %(%( %( %(&k2 %(  %(%(%(%(N*#*#*#*#*#*#ZOS#$#$#$#+C=#$GK#$ ##$#$#$#$V%)#'/3@@@C=@3- @ # @ SM @C=@T#s(^,@ #@@@@D ' '# '# '$ ' ' ' ''''''''+'>+448 G G smG %G C( G 8K01 G  G  G G G G G G G G G G rerc,eZdZdZdedeffd ZxZS)BeautifulStoneSoupz&Deprecated interface to an XML parser.rrRcd|d<tjdtdtt|j|i|dS)NxmlrOzThe BeautifulStoneSoup class was deprecated in version 4.0.0. Instead of using it, pass features="xml" into the BeautifulSoup constructor.rqr])r_r`rar?rPr)rrrRrCs rcrzBeautifulStoneSoup.__init__s]"z  J      1 $''0$A&AAAAAre)rDrErFrGr'rrMrNs@rcrPrPs]00BcBSBBBBBBBBBBrerP__main__)TrG __author__ __version__ __copyright__ __license____all__ collectionsrrrr_ version_infomajor ImportErrorr?rrbuilder._htmlparserrdammitrcssr _deprecationr elementrrr!rrr"r#rr$rr r r r r:r%filterrr&typingr'r(rIr)r*r+r,r-r.r/r0 bs4._typingr1r2r3r4r5r6r7bs4.exceptionsrrr bs4._warningsrrrrrr_s_souprPrDstdinrprintprettifyrzrercrls :  <     <  A + u  766666!!!!!! !                            y y y y y Cy y y z B B B B B B B B zJJJ = # #D E4==?? re