BYPASS SHELL BY ./RAZORGANZ
Server: nginx/1.20.1
System: Linux iZdzfnv9mwfppeZ 5.10.134-19.2.al8.x86_64 #1 SMP Wed Oct 29 22:47:09 CST 2025 x86_64
User: apache (48)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.6/site-packages/feedparser/namespaces/__pycache__/_base.cpython-36.pyc
3

_9j�B�@s@ddlZddlmZddlmZddlmZGdd�de�ZdS)�N�)�_parse_date)�make_safe_absolute_uri)�FeedParserDictc@s�eZdZdZdddddddddddddd�
Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	e	Z
dd�Zdd�Zdd�Z
e
Zdd�ZeZdd�ZeZdd�ZeZdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�ZeZeZd,d-�Z e Z!e Z"d.d/�Z#d0d1�Z$d2d3�Z%e%Z&d4d5�Z'e'Z(d6d7�Z)e)Z*d8d9�Z+e+Z,d:d;�Z-e-Z.d<d=�Z/e/Z0d>d?�Z1d@dA�Z2dBdC�Z3dDdE�Z4dFdG�Z5e5Z6e5Z7dHdI�Z8e8Z9e8Z:dJdK�Z;e;Z<e;Z=dLdM�Z>e>Z?e>Z@dNdO�ZAdPdQ�ZBdRdS�ZCdTdU�ZDdVdW�ZEeEZFdXdY�ZGeGZHdZd[�ZId\d]�ZJd^d_�ZKd`da�ZLeLZMdbdc�ZNeNZOddde�ZPdfdg�ZQdhdi�ZRdjdk�ZSdldm�ZTeTZUdndo�ZVeVZWdpdq�ZXeXZYdrds�ZZdtdu�Z[dvdw�Z\dxdy�Z]dzd{�Z^d|d}�Z_d~d�Z`d�d��Zad�d��ZbebZcd�d��ZdedZed�d��ZfefZgefZhefZiefZjd�d��Zkd�d��Zld�S)��	Namespacez�Support 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.
    �)
rzhttp://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#cCsbddddd�}|js$|jjd�r^|jdd�}|j|�}|rF||_n|jd	�rXd
|_nd|_dS)NZrss091uZrss092Zrss093Zrss094)z0.91z0.92z0.93z0.94Zrss�versionrz2.Zrss20)r�
startswith�get)�self�attrs_d�
versionmap�attr_versionr�r�E/usr/local/lib/python3.6/site-packages/feedparser/namespaces/_base.py�
_start_rss<s

zNamespace._start_rsscCsd|_|j|�dS)N�)�infeed�_cdf_common)rrrrr�_start_channelQszNamespace._start_channelcCs\d|kr,|ji�|d|jdd<|j�d|krX|ji�|d|jdd<|j�dS)NZlastmodr�href���rrr)�_start_modifiedZelementstack�
_end_modified�_start_link�	_end_link)rrrrrrUs

zNamespace._cdf_commoncCsBd|_dddd�}|js>|jd�}|j|�}|r8||_nd|_dS)NrZatom01Zatom02Zatom03)z0.1z0.2z0.3rZatom)rrr
)rrr
rrrrr�_start_feed_s

zNamespace._start_feedcCs
d|_dS)Nr)r)rrrr�_end_channellszNamespace._end_channelcCs8|j�}|js|jdt��d|_d|_|jdd�dS)N�imagerrr)�_get_context�inentry�
setdefaultr�inimage�title_depth�push)rr�contextrrr�_start_imagepszNamespace._start_imagecCs|jd�d|_dS)Nrr)�popr")rrrr�
_end_imagexs
zNamespace._end_imagecCs2|j�}|jdt��d|_d|_|jdd�dS)N�	textinputrrr)rr!r�intextinputr#r$)rrr%rrr�_start_textinput|s
zNamespace._start_textinputcCs|jd�d|_dS)Nr)r)r'r*)rrrr�_end_textinput�s
zNamespace._end_textinputcCs:d|_|jdd�|j�}|jdg�|djt��dS)Nr�authorZauthors)�inauthorr$rr!�appendr)rrr%rrr�
_start_author�s
zNamespace._start_authorcCs|jd�d|_|j�dS)Nr-r)r'r.�_sync_author_detail)rrrr�_end_author�s
zNamespace._end_authorcCs:d|_|j�}|jdg�|djt��|jdd�dS)NrZcontributors�contributorr)�
incontributorrr!r/rr$)rrr%rrr�_start_contributor�s
zNamespace._start_contributorcCs|jd�d|_dS)Nr3r)r'r4)rrrr�_end_contributor�s
zNamespace._end_contributorcCs|jdd�dS)N�namer)r$)rrrrr�_start_name�szNamespace._start_namecCsb|jd�}|jr |jd|d�n>|jr4|jd|�n*|jrH|jd|�n|jr^|j�}||d<dS)Nr7�	publisher)r'�inpublisher�_save_authorr.r4�_save_contributorr*r)r�valuer%rrr�	_end_name�s
zNamespace._end_namecCs|jdd�dS)N�widthr)r$)rrrrr�_start_width�szNamespace._start_widthcCsJ|jd�}yt|�}Wntk
r.d}YnX|jrF|j�}||d<dS)Nr?r)r'�int�
ValueErrorr"r)rr=r%rrr�
_end_width�s

zNamespace._end_widthcCs|jdd�dS)N�heightr)r$)rrrrr�
_start_height�szNamespace._start_heightcCsJ|jd�}yt|�}Wntk
r.d}YnX|jrF|j�}||d<dS)NrDr)r'rArBr"r)rr=r%rrr�_end_height�s

zNamespace._end_heightcCs|jdd�dS)Nrr)r$)rrrrr�
_start_url�szNamespace._start_urlcCs4|jd�}|jr|jd|�n|jr0|jd|�dS)Nr)r'r.r;r4r<)rr=rrr�_end_url�s

zNamespace._end_urlcCs|jdd�dS)N�emailr)r$)rrrrr�_start_email�szNamespace._start_emailcCsJ|jd�}|jr |jd|d�n&|jr4|jd|�n|jrF|jd|�dS)NrIr9)r'r:r;r.r4r<)rr=rrr�
_end_email�s
zNamespace._end_emailcCs|jd|dd�dS)N�subtitlez
text/plainr)�push_content)rrrrr�_start_subtitle�szNamespace._start_subtitlecCs|jd�dS)NrL)�pop_content)rrrr�
_end_subtitle�szNamespace._end_subtitlecCs|jd|dd�dS)N�rightsz
text/plainr)rM)rrrrr�
_start_rights�szNamespace._start_rightscCs|jd�dS)NrQ)rO)rrrr�_end_rights�szNamespace._end_rightscCsZ|jjt��|jdd�d|_d|_d|_|j|d�}|rL|j�}||d<|j	|�dS)N�itemrrz	rdf:about�idr)
�entriesr/rr$r �
guidislinkr#Z_get_attributerr)rrrUr%rrr�_start_item�szNamespace._start_itemcCs|jd�d|_d|_dS)NrTr)r'r �
hasContent)rrrr�	_end_items
zNamespace._end_itemcCs|jdd�dS)N�languager)r$)rrrrr�_start_language	szNamespace._start_languagecCs|jd�|_dS)Nr[)r'�lang)rrrr�
_end_languageszNamespace._end_languagecCs|jdd�dS)Nr9r)r$)rrrrr�_start_webmasterszNamespace._start_webmastercCs|jd�|jd�dS)Nr9)r'r1)rrrr�_end_webmasters
zNamespace._end_webmastercCs|jdd�dS)N�	publishedr)r$)rrrrr�_start_publishedszNamespace._start_publishedcCs"|jd�}|jdt|�dd�dS)NraZpublished_parsedT)�	overwrite)r'�_saver)rr=rrr�_end_publisheds
zNamespace._end_publishedcCs|jdd�dS)N�updatedr)r$)rrrrr�_start_updated!szNamespace._start_updatedcCs&|jd�}t|�}|jd|dd�dS)NrfZupdated_parsedT)rc)r'rrd)rr=Zparsed_valuerrr�_end_updated&s
zNamespace._end_updatedcCs|jdd�dS)N�createdr)r$)rrrrr�_start_created-szNamespace._start_createdcCs"|jd�}|jdt|�dd�dS)NriZcreated_parsedT)rc)r'rdr)rr=rrr�_end_created0s
zNamespace._end_createdcCs|jdd�dS)N�expiredr)r$)rrrrr�_start_expirationdate4szNamespace._start_expirationdatecCs|jdt|jd��dd�dS)NZexpired_parsedrlT)rc)rdrr')rrrr�_end_expirationdate7szNamespace._end_expirationdatecCsD|jd�}|jd|jd��}|jd�}|j|||�|jdd�dS)N�term�scheme�domain�label�categoryr)r
�_add_tagr$)rrrorprrrrr�_start_category:s


zNamespace._start_categorycCs\|jd�}|sdS|j�}|d}|rJt|�rJ|ddrJ||dd<n|j|dd�dS)Nrs�tagsrrorr)r'r�lenrt)rr=r%rvrrr�
_end_categoryBs
zNamespace._end_categorycCst|�|j�d<dS)NZcloud)rr)rrrrr�_start_cloudNszNamespace._start_cloudcCs�|jdd�|ddkr&|jdd�n|jdd�|j�}|j|�}d|kr^|j|d�|d<|jpn|jpn|j}|jdg�|jo�|js�|djt	|��d|kr�|j
d�dkr�|j|j
d��|jkr�|d|d	<n|j
d	|�dS)
N�relZ	alternater�typezapplication/atom+xmlz	text/htmlr�links�link)r!r�
_enforce_href�resolve_urirr �insourcer"r/rr
�map_content_type�
html_typesr$)rrr%Zexpecting_textrrrrQs"
zNamespace._start_linkcCs|jd�dS)Nr})r')rrrrrhszNamespace._end_linkcCs"|jdd�dk|_|jdd�dS)NZispermalink�truerUr)r
rWr$)rrrrr�_start_guidkszNamespace._start_guidcCs:|jd�}|jd|jo d|j�k�|jr6|jd|�dS)NrUrWr})r'rdrWr)rr=rrr�	_end_guidps
zNamespace._end_guidcCs<|jr|jdt|j���S|jd|d|jp4|jp4|j�dS)N�titlez
text/plain)�svgOKZunknown_starttag�list�itemsrMrr r�)rrrrr�_start_titleyszNamespace._start_titlecCs(|jr
dS|jd�}|sdS|j|_dS)Nr�)r�rO�depthr#)rr=rrr�
_end_title~s
zNamespace._end_titlecCsL|j�}d|kr*|jr*d|_|j|�n|jd|d|jpD|jpD|j�dS)N�summary�content�descriptionz	text/html)rrY�_summaryKey�_start_contentrMrr r�)rrr%rrr�_start_description�s
zNamespace._start_descriptioncCs"|jd|d|jp|jp|j�dS)Nr�z
text/plain)rMrr r�)rrrrr�_start_abstract�szNamespace._start_abstractcCs(|jdkr|j�n
|jd�d|_dS)Nr�r�)r��_end_contentrO)rrrr�_end_description�s


zNamespace._end_descriptioncCs|jd|dd�dS)N�infoz
text/plainr)rM)rrrrr�_start_info�szNamespace._start_infocCs|jd�dS)Nr�)rO)rrrr�	_end_info�szNamespace._end_infocCsH|r(|j|�}d|kr(|j|d�|d<t|�|j�d<|jdd�dS)Nr�generator_detail�	generatorr)r~rrrr$)rrrrr�_start_generator�s
zNamespace._start_generatorcCs*|jd�}|j�}d|kr&||dd<dS)Nr�r�r7)r'r)rr=r%rrr�_end_generator�s
zNamespace._end_generatorcCsF|j�}d|kr*|jr*d|_|j|�nd|_|j|j|dd�dS)Nr�r�z
text/plainr)rrYr�r�rM)rrr%rrr�_start_summary�szNamespace._start_summarycCs.|jdkr|j�n|j|jp d�d|_dS)Nr�r�)r�r�rO)rrrr�_end_summary�s

zNamespace._end_summarycCs4|j|�}|j�}d|d<|jdg�jt|��dS)NZ	enclosurerzr|)r~rr!r/r)rrr%rrr�_start_enclosure�s
zNamespace._start_enclosurecCs2d|kr|d|jd<|jdd�d|_d|_dS)N�urlr�sourcerr)�
sourcedatar$r�r#)rrrrr�
_start_source�s
zNamespace._start_sourcecCs@d|_|jd�}|r||jd<tj|j�|j�d<|jj�dS)Nrr�r�)r�r'r��copy�deepcopyr�clear)rr=rrr�_end_source�s

zNamespace._end_sourcecCs>d|_|jd|dd�|jd�}|r.||jd<|jdd�dS)Nrr�z
text/plain�src)rYrMr
�
contentparamsr$)rrr�rrrr��s

zNamespace._start_contentcCs|jd|dd�dS)Nr�zapplication/xhtml+xmlr)rM)rrrrr�_start_body�szNamespace._start_bodycCsd|_|jd|dd�dS)Nrr�z	text/html)rYrM)rrrrr�_start_content_encoded�sz Namespace._start_content_encodedcCs<|j|jjd��dh|jBk}|jd�}|r8|jd|�dS)Nr{z
text/plainr�r�)r�r�r
r�rOrd)rZ
copyToSummaryr=rrrr��s
zNamespace._end_contentcCs|jdd�dS)N�newlocationr)r$)rrrrr�_start_newlocation�szNamespace._start_newlocationcCs8|jd�}|j�}||jk	r dSt|j|j��|d<dS)Nr�)r'rZfeeddatarZbaseuri�strip)rr�r%rrr�_end_newlocation�s


zNamespace._end_newlocationN)m�__name__�
__module__�__qualname__�__doc__Zsupported_namespacesrrrrrZ	_end_feedr&r(r+Z_start_textInputr,Z_end_textInputr0Z_start_managingeditorr2Z_end_managingeditorr5r6r8r>r@rCrErFrGZ_start_homepageZ
_start_urirHZ
_end_homepageZ_end_urirJrKrNZ_start_taglinerPZ_end_taglinerRZ_start_copyrightrSZ_end_copyrightrXZ_start_entryrZZ
_end_entryr\r^r_r`rbZ
_start_issuedZ_start_pubdatereZ_end_issuedZ_end_pubdatergrZ_start_lastbuilddaterhrZ_end_lastbuilddaterjrkrmrnruZ_start_keywordsrxZ
_end_keywordsryrrr�Z	_start_idr�Z_end_idr�r�r�r�r�Z
_end_abstractr�Z!_start_feedburner_browserfriendlyr�Z_end_feedburner_browserfriendlyr�r�r�r�r�r�r�r�r�Z_start_xhtml_bodyr�Z_start_fullitemr�Z	_end_bodyZ_end_xhtml_bodyZ_end_content_encodedZ
_end_fullitemr�r�rrrrr$s�



	
	r)	r�Z	datetimesr�urlsr�utilr�objectrrrrr�<module>s