L iBFddlZddlmZddlmZddlmZGddeZy)N) _parse_date)make_safe_absolute_uri)FeedParserDictcXeZdZdZdddddddddddddd ZdZdZdZdZdZ e Z d Z d Z d Z e Zd ZeZd ZeZdZeZdZdZdZdZdZdZdZdZdZeZeZdZ e Z!e Z"dZ#dZ$dZ%e%Z&dZ'e'Z(dZ)e)Z*dZ+e+Z,dZ-e-Z.d Z/e/Z0d!Z1d"Z2d#Z3d$Z4d%Z5e5Z6e5Z7d&Z8e8Z9e8Z:d'Z;e;Ze>Z?e>Z@d)ZAd*ZBd+ZCd,ZDd-ZEeEZFd.ZGeGZHd/ZId0ZJd1ZKd2ZLeLZMd3ZNeNZOd4ZPd5ZQd6ZRd7ZSd8ZTeTZUd9ZVeVZWd:ZXeXZYd;ZZd<Z[d=Z\d>Z]d?Z^d@Z_dAZ`dBZadCZbebZcdDZdedZedEZfefZgefZhefZiefZjdFZkdGZlyH)I NamespacezSupport for the Atom, RSS, RDF, and CDF feed formats. The feed formats all share common elements, some of which have conflicting interpretations. For simplicity, all of the base feed format support is collected here. ) r zhttp://backend.userland.com/rssz%http://blogs.law.harvard.edu/tech/rsszhttp://purl.org/rss/1.0/z&http://my.netscape.com/rdf/simple/0.9/zhttp://example.com/newformat#zhttp://example.com/nechozhttp://purl.org/echo/zuri/of/echo/namespace#zhttp://purl.org/pie/zhttp://purl.org/atom/ns#zhttp://www.w3.org/2005/Atomz'http://purl.org/rss/1.0/modules/rss091#cddddd}|jr|jjdsN|jdd}|j|}|r||_y|jd rd |_yd|_yy) Nrss091urss092rss093rss094)z0.91z0.92z0.93z0.94rssversionr z2.rss20)r startswithgetselfattrs_d versionmap attr_versionrs a/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/feedparser/namespaces/_base.py _start_rsszNamespace._start_rss<sy  ||4<<#:#:5#A";;y"5L nn\2G& ((.& $ $Bc4d|_|j|y)N)infeed _cdf_commonrrs r_start_channelzNamespace._start_channelQs  !rcd|vr6|ji|d|jdd<|jd|vr7|ji|d|jdd<|j yy)Nlastmodhref)_start_modified elementstack _end_modified _start_link _end_linkr s rrzNamespace._cdf_commonUs|     $(/ (:D  b !" %    W    R (/D  b !" % NN  rcd|_dddd}|js4|jd}|j|}|r||_yd|_yy)Nratom01atom02atom03)z0.1z0.2z0.3ratom)rrrrs r _start_feedzNamespace._start_feed_sT %%%' ||";;y1L nn\2G& % rcd|_y)Nr)rrs r _end_channelzNamespace._end_channells  rc|j}|js|jdtd|_d|_|j ddy)Nimagerr$r) _get_contextinentry setdefaultrinimage title_depthpushrrcontexts r _start_imagezNamespace._start_imagepsG##%||   w(8 9  '1rc4|jdd|_y)Nr5r)popr9r2s r _end_imagezNamespace._end_imagexs  rc|j}|jdtd|_d|_|j ddy)N textinputrr$r)r6r8r intextinputr:r;r<s r_start_textinputzNamespace._start_textinput|sA##%;(89 +q!rc4|jdd|_y)NrCr)r@rDr2s r_end_textinputzNamespace._end_textinputs rcd|_|jdd|j}|jdg|dj t y)Nrauthorauthors)inauthorr;r6r8appendrr<s r _start_authorzNamespace._start_authorsK  (A##%9b) !!."23rcT|jdd|_|jy)NrIr)r@rK_sync_author_detailr2s r _end_authorzNamespace._end_authors!     "rcd|_|j}|jdg|djt |j ddy)Nr contributors contributorr) incontributorr6r8rLrr;r<s r_start_contributorzNamespace._start_contributorsL##%>2.&&~'78 -#rc4|jdd|_y)NrSr)r@rTr2s r_end_contributorzNamespace._end_contributors rc(|jddy)Nnamerr;r s r _start_namezNamespace._start_name &!rc&|jd}|jr|jd|dy|jr|jd|y|jr|j d|y|j r|j}||d<yy)NrY publisher)r@ inpublisher _save_authorrKrT_save_contributorrDr6rvaluer=s r _end_namezNamespace._end_names       fe[ 9 ]]   fe ,     " "65 1   '')G#GFOrc(|jddyNwidthrrZr s r _start_widthzNamespace._start_width '1rc|jd} t|}|jr|j }||d<yy#t$rd}Y0wxYwrfr@int ValueErrorr9r6rbs r _end_widthzNamespace._end_widthsZ! JE <<'')G$GG   E  A AAc(|jddyNheightrrZr s r _start_heightzNamespace._start_heights (Arc|jd} t|}|jr|j }||d<yy#t$rd}Y0wxYwrqrkrbs r _end_heightzNamespace._end_heightsZ" JE <<'')G %GH   E roc(|jddy)Nr%rrZr s r _start_urlzNamespace._start_urlr\rc|jd}|jr|jd|y|jr|j d|yy)Nr%)r@rKr`rTrarrcs r_end_urlzNamespace._end_urlsE  ==   fe ,     " "65 1 rc(|jddy)NemailrrZr s r _start_emailzNamespace._start_emailrirc|jd}|jr|jd|dy|jr|jd|y|jr|j d|yy)Nr|r^)r@r_r`rKrTrarys r _end_emailzNamespace._end_emails`!      guk : ]]   gu -     " "7E 2 rc,|jd|ddy)Nsubtitle text/plainr push_contentr s r_start_subtitlezNamespace._start_subtitles *g|Q?rc&|jdy)Nr pop_contentr2s r _end_subtitlezNamespace._end_subtitles $rc,|jd|ddy)Nrightsrrrr s r _start_rightszNamespace._start_rightss (G\1=rc&|jdy)Nrrr2s r _end_rightszNamespace._end_rightss "rc |jjt|jddd|_d|_d|_|j|d}|r|j}||d<|j|y)Nitemrrr$z rdf:aboutid) entriesrLrr;r7 guidislinkr:_get_attributer6r)rrrr=s r _start_itemzNamespace._start_itemsu N,- &!   + 6 '')GGDM !rcB|jdd|_d|_y)Nrr)r@r7 hasContentr2s r _end_itemzNamespace._end_items  rc(|jddy)NlanguagerrZr s r_start_languagezNamespace._start_language s *a rc0|jd|_y)Nr)r@langr2s r _end_languagezNamespace._end_language sHHZ( rc(|jddy)Nr^rrZr s r_start_webmasterzNamespace._start_webmaster +q!rcH|jd|jdy)Nr^)r@rOr2s r_end_webmasterzNamespace._end_webmasters    -rc(|jddy)N publishedrrZr s r_start_publishedzNamespace._start_publishedrrc`|jd}|jdt|dy)Nrpublished_parsedT overwriter@_saverrys r_end_publishedzNamespace._end_publisheds(% %{5'9T Jrc(|jddy)NupdatedrrZr s r_start_updatedzNamespace._start_updated! )Qrcd|jd}t|}|jd|dy)Nrupdated_parsedTr)r@rr)rrc parsed_values r _end_updatedzNamespace._end_updated&s-#"5)  #\T Brc(|jddy)NcreatedrrZr s r_start_createdzNamespace._start_created-rrc`|jd}|jdt|dy)Nrcreated_parsedTrrrys r _end_createdzNamespace._end_created0s(# #[%74 Hrc(|jddy)NexpiredrrZr s r_start_expirationdatezNamespace._start_expirationdate4rrc\|jdt|jddy)Nexpired_parsedrTr)rrr@r2s r_end_expirationdatezNamespace._end_expirationdate7s$ #[)1D%EQU Vrc|jd}|jd|jd}|jd}|j||||jddy)Ntermschemedomainlabelcategoryr)r_add_tagr;)rrrrrs r_start_categoryzNamespace._start_category:sU{{6"Xw{{8'<= G$ dFE* *a rc|jd}|sy|j}|d}|rt|r|dds ||dd<y|j|ddy)Nrtagsr$r)r@r6lenr)rrcr=rs r _end_categoryzNamespace._end_categoryBs_$ ##%v SYtBx'7$DHV  MM%t ,rc<t||jd<y)Ncloud)rr6r s r _start_cloudzNamespace._start_cloudNs'5g'>G$rc|jdd|ddk(r|jddn|jdd|j}|j|}d|vr|j|d|d<|jxs|j xs |j }|jdg|j r |js|djt|d|vrK|jddk(r6|j|jd|jvr |d|d <yyy|jd |y) Nrel alternatertypezapplication/atom+xml text/htmlr%linkslink)r8r6 _enforce_href resolve_urirr7insourcer9rLrrmap_content_type html_typesr;)rrr=expecting_texts rr)zNamespace._start_linkQs.5+. 5>V #   v'= >   v{ 3##%$$W- W "..wv?GFOE E 7B'  G  # #N7$; < W KK&+5--gkk&.ABdooU")&/V6 IIfn -rc&|jdy)Nr)r@r2s rr*zNamespace._end_linkhs rc\|jdddk(|_|jddy)N ispermalinktruerr)rrr;r s r _start_guidzNamespace._start_guidks'";;}f=G $rc|jd}|jd|jxrd|jv|jr|jd|yy)Nrrr)r@rrr6rys r _end_guidzNamespace._end_guidpsP <!VV4CTCTCV5VW ?? JJvu % rc|jr)|jdt|jS|j d|d|j xs|j xs |jy)Ntitler)svgOKunknown_starttaglistitemsrrr7rr s r _start_titlezNamespace._start_titleysT ::(($w}}2GH H '7L$++:f:fY]YfYfgrch|jry|jd}|sy|j|_y)Nr)rrdepthr:rys r _end_titlezNamespace._end_title~s. ::   ) ::rc|j}d|vr%|jsd|_|j|y|j d|d|j xs|j xs |jy)Nsummarycontent descriptionr)r6r _summaryKey_start_contentrrr7rr<s r_start_descriptionzNamespace._start_descriptionsd##%  (D     (   mWk4;;CoRVR^R^Cobfbobo prcx|jd|d|jxs|jxs |jy)Nrr)rrr7rr s r_start_abstractzNamespace._start_abstracts/ -, @lt||@l_c_l_lmrc|jdk(r|jd|_y|jdd|_y)Nrrr _end_contentrr2s r_end_descriptionzNamespace._end_descriptions>   y (        ] +rc,|jd|ddy)Ninforrrr s r _start_infozNamespace._start_infos &'<;rc&|jdy)Nrrr2s r _end_infozNamespace._end_infos  rc|r,|j|}d|vr|j|d|d<t||jd<|j ddy)Nr%generator_detail generatorr)rrrr6r;r s r_start_generatorzNamespace._start_generators\ ((1G "&"2"276?"C2@2I./ +q!rc`|jd}|j}d|vr ||dd<yy)NrrrY)r@r6rbs r_end_generatorzNamespace._end_generators;%##%  (27G& ' / )rc|j}d|vr%|jsd|_|j|yd|_|j |j|ddy)Nrrrr)r6rrrrr<s r_start_summaryzNamespace._start_summarysV##%  (D     ((D    d..q Irc|jdk(r|jd|_y|j|jxsdd|_y)Nrrrr2s r _end_summaryzNamespace._end_summarysI   y (        T--: ;rc|j|}|j}d|d<|jdgjt |y)N enclosurerr)rr6r8rLrr<s r_start_enclosurezNamespace._start_enclosuresI$$W-##%$7B'..~g/FGrcpd|vr|d|jd<|jddd|_d|_y)Nurlr%sourcerr$) sourcedatar;rr:r s r _start_sourcezNamespace._start_sources9 G &-enDOOF # (A rcd|_|jd}|r||jd<tj|j|j d<|jj y)Nrrr)rr@rcopydeepcopyr6clearrys r _end_sourcezNamespace._end_sourcesX " ',DOOG $(, doo(FH% rcd|_|jd|dd|jd}|r||jd<|j ddy)Nrrrsrc)rrr contentparamsr;)rrrs rrzNamespace._start_contentsL )WlA>kk%  (+D  u % )Qrc,|jd|ddy)Nrzapplication/xhtml+xmlrrr s r _start_bodyzNamespace._start_bodys )W.EqIrc:d|_|jd|ddy)Nrrr)rrr s r_start_content_encodedz Namespace._start_content_encodeds )Wk1=rc|j|jjddh|jzv}|j d}|r|j d|yy)Nrrrr)rrrrrr)r copyToSummaryrcs rrzNamespace._end_contents^--d.@.@.D.DV.LMS_R`cgcrcrRrs   +  JJy% ( rc(|jddy)N newlocationrrZr s r_start_newlocationzNamespace._start_newlocations -#rc|jd}|j}||juryt|j|j |d<y)Nr")r@r6feeddatarbaseuristrip)rrr=s r_end_newlocationzNamespace._end_newlocationsHhh}%##% $-- ' !7 ciik!R rN)m__name__ __module__ __qualname____doc__supported_namespacesrr!rr0r3 _end_feedr>rArE_start_textInputrG_end_textInputrM_start_managingeditorrP_end_managingeditorrUrWr[rdrhrnrsrurw_start_homepage _start_urirz _end_homepage_end_urir}rr_start_tagliner _end_tagliner_start_copyrightr_end_copyrightr _start_entryr _end_entryrrrrr _start_issued_start_pubdater _end_issued _end_pubdaterr&_start_lastbuilddaterr(_end_lastbuilddaterrrrr_start_keywordsr _end_keywordsrr)r*r _start_idr_end_idrrrrr _end_abstractr!_start_feedburner_browserfriendlyr_end_feedburner_browserfriendlyrrrr r rrrr_start_xhtml_bodyr_start_fullitemr _end_body_end_xhtml_body_end_content_encoded _end_fullitemr#r(rrrr$sv +-13$&24)+$&!#"$ "$&')35 %*" &I" ($N4*#&$ $%& OJ2 MH3@$N% L>$# N "LJ!)"."$M%NK!K!L $O)C!M% I W! &O -"M?..I&Gh &qn %M<(3%!&/#"8 J H   J#>-O) I"O' M$Srr) r datetimesrurlsrutilrobjectrrPrrrUs#: #)!VSVSr