o
    i_
                     @   s0   d dl mZ ddlmZmZ G dd deZdS )   )InfoExtractor   )int_or_none	qualitiesc                   @   sf   e Zd ZdZdgZddddddd	d
ddd	ddddgZdddddddd	d
dd	dgZdd ZdS )CrooksAndLiarsIEzDhttps?://embed\.crooksandliars\.com/(?:embed|v)/(?P<id>[A-Za-z0-9]+)zn<(?:iframe[^>]+src|param[^>]+value)=(["\'])(?P<url>(?:https?:)?//embed\.crooksandliars\.com/(?:embed|v)/.+?)\1z/https://embed.crooksandliars.com/embed/8RUoRhRi8RUoRhRimp4zMFox & Friends Says Protecting Atheists From Discrimination Is Anti-Christian!z$md5:e1a46ad1650e3a5ec7196d432799127fz(re:https?://crooksandliars\.com/files/.+i U20150405Heather   )	idexttitledescription	thumbnail	timestampupload_dateuploaderduration)url	info_dictz1http://embed.crooksandliars.com/v/MTE3MjUtMzQ2MzAT)r   only_matchingzGhttps://crooksandliars.com/2015/04/fox-friends-says-protecting-atheists)	r   r   r   r   r   r   r   r   r   c                    s   |  |}| d| |}| d|d|}td  fdd|d D }|||d |d	| |d
t|d|dt|d|d	S )Nz&http://embed.crooksandliars.com/embed/zvar\s+manifest\s*=zmanifest JSON)webm_lowmp4_low	webm_highmp4_highc                    s6   g | ]}|d   dr|d |d  |d dqS )mimezvideo/r   type)r   	format_idquality)
startswith).0itemr    S/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/crooksandliars.py
<listcomp>5   s    

z2CrooksAndLiarsIE._real_extract.<locals>.<listcomp>flavorsr   r   postercreatedauthorr   )	r   r   r   r   r   r   r   r   formats)	_match_id_download_webpage_search_jsonr   get_proto_relative_urlr   )selfr   video_idwebpagemanifestr+   r$   r#   r%   _real_extract+   s&   


zCrooksAndLiarsIE._real_extractN)__name__
__module____qualname__
_VALID_URL_EMBED_REGEX_TESTS_WEBPAGE_TESTSr5   r$   r$   r$   r%   r      s@    r   N)commonr   utilsr   r   r   r$   r$   r$   r%   <module>   s    