o
    ËÄ.j  ã                   @   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 )(Ú	NamespaceÚitunes)z*http://www.itunes.com/DTDs/PodCast-1.0.dtdz'http://example.com/DTDs/PodCast-1.0.dtdc                 C   ó   |   |¡ d S ©N)Ú_start_author©ÚselfÚattrs_d© r   úQ/home/thesage/.local/lib/python3.10/site-packages/feedparser/namespaces/itunes.pyÚ_start_itunes_author)   ó   zNamespace._start_itunes_authorc                 C   ó   |   ¡  d S r   )Ú_end_author©r	   r   r   r   Ú_end_itunes_author,   ó   zNamespace._end_itunes_authorc                 C   r   r   )Ú_end_categoryr   r   r   r   Ú_end_itunes_category/   r   zNamespace._end_itunes_categoryc                 C   r   r   )Ú_start_namer   r   r   r   Ú_start_itunes_name2   r   zNamespace._start_itunes_namec                 C   r   r   )Ú	_end_namer   r   r   r   Ú_end_itunes_name5   r   zNamespace._end_itunes_namec                 C   r   r   )Ú_start_emailr   r   r   r   Ú_start_itunes_email8   r   zNamespace._start_itunes_emailc                 C   r   r   )Ú
_end_emailr   r   r   r   Ú_end_itunes_email;   r   zNamespace._end_itunes_emailc                 C   r   r   )Ú_start_subtitler   r   r   r   Ú_start_itunes_subtitle>   r   z Namespace._start_itunes_subtitlec                 C   r   r   )Ú_end_subtitler   r   r   r   Ú_end_itunes_subtitleA   r   zNamespace._end_itunes_subtitlec                 C   r   r   )Ú_start_summaryr   r   r   r   Ú_start_itunes_summaryD   r   zNamespace._start_itunes_summaryc                 C   r   r   )Ú_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)   Ú_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 )NÚ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Útextr1   Úcategoryr&   )r4   Ú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 )NÚitunes_imager(   ÚhrefÚimageÚurl)r*   r9   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 )NÚitunes_blockr(   ÚyesÚ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 )NÚitunes_explicitr(   )NFTrB   r   ÚcleanrD   rE   r   r   r   Ú_end_itunes_explicith   s   (zNamespace._end_itunes_explicitN)Ú__name__Ú
__module__Ú__qualname__Úsupported_namespacesr   r   r   r   r   r   r   r   r!   r#   r%   r+   r.   r6   r:   r@   Ú_start_itunes_linkrG   rJ   r   r   r   r   r       s.    ûr   N)Úutilr   Úobjectr   r   r   r   r   Ú<module>   s   