o
    ix                     @   s4   d dl Z ddlmZ ddlmZ G dd deZdS )    N   )InfoExtractor   )extract_attributesc                   @   s@   e Zd ZdZdddddddd	d
dddgZdZdd ZdS )TheSunIEz=https?://(?:www\.)?the-?sun(\.co\.uk|\.com)/[^/]+/(?P<id>\d+)zhttps://www.thesun.co.uk/tvandshowbiz/2261604/orlando-bloom-and-katy-perry-post-adorable-instagram-video-together-celebrating-thanksgiving-after-split-rumours/2261604z$md5:cba22f48bad9218b64d5bbe0e16afddf)idtitler   )url	info_dictplaylist_countzdhttps://www.the-sun.com/entertainment/7611415/1000lb-sisters-fans-rip-amy-dangerous-health-decision/7611415z$md5:e0b9b976f79dc770e5c80f22f40bb844r   zFhttp://players.brightcove.net/%s/default_default/index.html?videoId=%sc           	      C   s~   |  |}| ||}g }td|D ]}t|}|d }|dd}|| | j||f d| q| 	||| j
|ddS )Nz'<video[^>]+data-video-id-pending=[^>]+>zdata-video-id-pendingzdata-account5067014667001BrightcoveNewF)fatal)	_match_id_download_webpagerefindallr   getappend
url_resultBRIGHTCOVE_URL_TEMPLATEplaylist_result_og_search_title)	selfr
   
article_idwebpageentriesvideoattrsvideo_id
account_id r#   K/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/thesun.py_real_extract   s"   
zTheSunIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTSr   r%   r#   r#   r#   r$   r      s"    r   )r   commonr   utilsr   r   r#   r#   r#   r$   <module>   s    