U
    gx                     @   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/Z2261604z$md5:cba22f48bad9218b64d5bbe0e16afddf)idtitler   )urlZ	info_dictZplaylist_countzdhttps://www.the-sun.com/entertainment/7611415/1000lb-sisters-fans-rip-amy-dangerous-health-decision/Z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-accountZ5067014667001ZBrightcoveNewF)fatal)Z	_match_idZ_download_webpagerefindallr   getappendZ
url_resultBRIGHTCOVE_URL_TEMPLATEZplaylist_resultZ_og_search_title)	selfr	   Z
article_idZwebpageentriesvideoattrsZvideo_idZ
account_id r   ;/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/thesun.py_real_extract   s(    
   zTheSunIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTSr   r   r   r   r   r   r      s    r   )r   commonr   utilsr   r   r   r   r   r   <module>   s   