
    VGh1
                     B    d dl mZ ddlmZmZmZmZmZ  G d de      Zy)   )InfoExtractor   )ExtractorErrorget_element_by_attributeparse_durationtry_getupdate_url_queryc            
       P    e Zd ZdZdddddddd	d
ddddddddddddgZdZd Zy)
USATodayIEz;https?://(?:www\.)?usatoday\.com/(?:[^/]+/)*(?P<id>[^?/#]+)zmhttp://www.usatoday.com/media/cinematic/video/81729424/us-france-warn-syrian-regime-ahead-of-new-peace-talks/ 033587d2529dc3411a1ab3644c3b88274799374959001mp4z6US, France warn Syrian regime ahead of new peace talksiVz$md5:7e50464fdf2126b0f533748d3c78d58f2990617000120160313)idexttitle	timestampdescriptionuploader_idupload_date)urlmd5	info_dictzzhttps://www.usatoday.com/story/tech/science/2018/08/21/yellowstone-supervolcano-eruption-stop-worrying-its-blow/973633002/5824495846001z4Yellowstone more likely to crack rather than explodei{[z$md5:3715e7927639a4f16b474e9391687c622891177500120180820)r   r   zFhttp://players.brightcove.net/%s/default_default/index.html?videoId=%sc                    | j                  |      }| j                  t        |ddi      |      }t        dd|      }|st	        dd      | j                  ||      }t        |d t              xs i }d	| j                  |j                  d
d      |j                  d      xs |d   fz  t        |d         |d   |j                  d      |j                  d      t        |j                  d            ddS )Najaxtrueclasszui-video-datazno video on the webpageT)expectedc                     | d   d   S )Nasset_metadataitems )xs    b/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/usatoday.py<lambda>z*USATodayIE._real_extract.<locals>.<lambda>0   s    Q/?-@-I     url_transparentbrightcoveaccountr   brightcoveidbrightcove_idr   r   	thumbnailr   lengthBrightcoveNew)_typer   r   r   r/   r   durationie_key)	_match_id_download_webpager	   r   r   _parse_jsonr   dictBRIGHTCOVE_URL_TEMPLATEgetstrr   )selfr   
display_idwebpageui_video_data
video_dataitems          r(   _real_extractzUSATodayIE._real_extract)   s   ^^C(
(()9#?O)PR\]0/7S !:TJJ%%mZ@
z#I4PVTV '//488<OQ^3_aeaiaijxay  bY  ~H  IX  ~Y  3Z  Zj&'(#4%>>-8&z~~h'?@%	
 		
r*   N)__name__
__module____qualname__
_VALID_URL_TESTSr9   rB   r&   r*   r(   r   r      si    OJ 1!M#A(%
	 L!K#A(%
F4 g
r*   r   N)	commonr   utilsr   r   r   r   r	   r   r&   r*   r(   <module>rJ      s    ! 0
 0
r*   