o
    úG§b  ã                   @   s    d dl mZ G dd„ deƒZdS )é   )ÚFeedParserDictc                   @   sª   e Zd ZdddœZdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd!d"„ ZeZd#d$„ Zd%d&„ Zd'S )(Ú	NamespaceZitunes)z*http://www.itunes.com/DTDs/PodCast-1.0.dtdz'http://example.com/DTDs/PodCast-1.0.dtdc                 C   ó   |   |¡ d S ©N)Z_start_author©ÚselfZattrs_d© r   úG/usr/local/lib/python3.10/dist-packages/feedparser/namespaces/itunes.pyÚ_start_itunes_author)   ó   zNamespace._start_itunes_authorc                 C   ó   |   ¡  d S r   )Z_end_author©r   r   r   r	   Ú_end_itunes_author,   ó   zNamespace._end_itunes_authorc                 C   r   r   )Z_end_categoryr   r   r   r	   Ú_end_itunes_category/   r   zNamespace._end_itunes_categoryc                 C   r   r   )Z_start_namer   r   r   r	   Ú_start_itunes_name2   r   zNamespace._start_itunes_namec                 C   r   r   )Z	_end_namer   r   r   r	   Ú_end_itunes_name5   r   zNamespace._end_itunes_namec                 C   r   r   )Z_start_emailr   r   r   r	   Ú_start_itunes_email8   r   zNamespace._start_itunes_emailc                 C   r   r   )Z
_end_emailr   r   r   r	   Ú_end_itunes_email;   r   zNamespace._end_itunes_emailc                 C   r   r   )Z_start_subtitler   r   r   r	   Ú_start_itunes_subtitle>   r   z Namespace._start_itunes_subtitlec                 C   r   r   )Z_end_subtitler   r   r   r	   Ú_end_itunes_subtitleA   r   zNamespace._end_itunes_subtitlec                 C   r   r   )Z_start_summaryr   r   r   r	   Ú_start_itunes_summaryD   r   zNamespace._start_itunes_summaryc                 C   r   r   )Z_end_summaryr   r   r   r	   Ú_end_itunes_summaryG   r   zNamespace._end_itunes_summaryc                 C   s   d| _ |  dd¡ d S )Né   Ú	publisheré    )ÚinpublisherÚpushr   r   r   r	   Ú_start_itunes_ownerJ   s   zNamespace._start_itunes_ownerc                 C   s   |   d¡ d| _|  d¡ d S )Nr   r   )Úpopr   Z_sync_author_detailr   r   r   r	   Ú_end_itunes_ownerN   s   
zNamespace._end_itunes_ownerc                 C   s4   |   d¡ d¡D ]}| ¡ r|  | ¡ dd ¡ qd S )NZitunes_keywordsú,úhttp://www.itunes.com/)r   ÚsplitÚstripÚ_add_tag)r   Útermr   r   r	   Ú_end_itunes_keywordsS   s
   €þzNamespace._end_itunes_keywordsc                 C   s$   |   | d¡dd ¡ |  dd¡ d S )NÚtextr"   Úcategoryr   )r%   Úgetr   r   r   r   r	   Ú_start_itunes_categoryX   s   z Namespace._start_itunes_categoryc                 C   s`   |   dd¡ | d¡rtd| d¡iƒ|  ¡ d< d S | d¡r.td| d¡iƒ|  ¡ d< d S d S )NZitunes_imager   ÚhrefÚimageÚurl)r   r*   r   Ú_get_contextr   r   r   r	   Ú_start_itunes_image\   s   

ÿzNamespace._start_itunes_imagec                 C   s0   |   dd¡}|dks|dkrdpd|  ¡ d< d S )NZitunes_blockr   ÚyesZYesr   ©r   r/   ©r   Úvaluer   r   r	   Ú_end_itunes_blockd   s   $zNamespace._end_itunes_blockc                 C   s4   |   dd¡}d|dkrdp|dkpd |  ¡ d< d S )NZitunes_explicitr   )NFTr1   r   Úcleanr2   r3   r   r   r	   Ú_end_itunes_explicith   s   (zNamespace._end_itunes_explicitN)Ú__name__Ú
__module__Ú__qualname__Zsupported_namespacesr
   r   r   r   r   r   r   r   r   r   r   r   r    r'   r+   r0   Z_start_itunes_linkr5   r7   r   r   r   r	   r       s.    ûr   N)Úutilr   Úobjectr   r   r   r   r	   Ú<module>   s   