U
    gS                     @   sH   d dl mZ d dlmZ ddlmZmZ ddlmZ G dd deZ	dS )	   )InfoExtractor)WatIE   )ExtractorErrorint_or_none)traverse_objc                	   @   s\   e Zd ZdZdddddddd	d
diddddddddd	d
diddddgZdd ZdS )LCIIEzLhttps?://(?:www\.)?(?:lci|tf1info)\.fr/(?:[^/?#]+/)+[\w-]+-(?P<id>\d+)\.htmlz_https://www.tf1info.fr/replay-lci/videos/video-24h-pujadas-du-vendredi-24-mai-6708-2300831.htmlZ14113788Zmp4z#24H Pujadas du vendredi 24 mai 2024zIhttps://photos.tf1.fr/1280/720/24h-pujadas-du-24-mai-2024-55bf2d-0@1x.jpgZ20240524i  )idexttitleZ	thumbnailZupload_datedurationZskip_downloadT)urlZ	info_dictparamszhttps://www.tf1info.fr/politique/election-presidentielle-2022-second-tour-j-2-marine-le-pen-et-emmanuel-macron-en-interview-de-lci-vendredi-soir-2217486.htmlZ13875948z$md5:660df5481fd418bc3bbb0d070e6fdb5azhttps://photos.tf1.fr/1280/720/presidentielle-2022-marine-le-pen-et-emmanuel-macron-invites-de-lci-ce-vendredi-9c0e73-e1a036-0@1x.jpgZ20220422!   zhttps://www.lci.fr/politique/election-presidentielle-2022-second-tour-j-2-marine-le-pen-et-emmanuel-macron-en-interview-de-lci-vendredi-soir-2217486.html)r   Zonly_matchingc                 C   sl   |  |}| ||}| ||}t|dddddtjhdthtf	}|d krTtd| 	d| t
t|S )	NpropsZ	pagePropspageZtmsZvideos.zCould not find wat_idzwat:)Z	_match_idZ_download_webpageZ_search_nextjs_datar   dictkeysr   anyr   Z
url_resultr   str)selfr   Zvideo_idZwebpageZ	next_dataZwat_id r   8/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/lci.py_real_extract(   s"    
        zLCIIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTSr   r   r   r   r   r      s<   	 	 r   N)
commonr   Zwatr   utilsr   r   Zutils.traversalr   r   r   r   r   r   <module>   s   