U
    $Pfz                     @   s@   d dl mZ d dlZddlmZ ddlmZ G dd deZdS )	    )unicode_literalsN   )InfoExtractor   )extract_attributesc                   @   s.   e Zd ZdZddddddZdZd	d
 ZdS )TheSunIEz2https://(?:www\.)?thesun\.co\.uk/[^/]+/(?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_countzFhttp://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-7zdooeg3/youtube_dl/extractor/thesun.py_real_extract   s(    
   zTheSunIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTr   r   r   r   r   r   r   	   s   r   )
__future__r   r   commonr   utilsr   r   r   r   r   r   <module>   s   