
    yf                     F    d dl mZ ddlmZmZmZmZmZmZ  G d de      Z	y)   )InfoExtractor   )ExtractorErrorint_or_noneparse_age_limitparse_iso8601smuggle_urlstr_or_nonec                       e Zd ZdZdddddddd	d
ddddddidddi dddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2ddid3d4dd5d6dd5d7dd5gZd8 Zy9):CWTVIEzhttps?://(?:www\.)?cw(?:tv(?:pr)?|seed)\.com/(?:shows/)?(?:[^/]+/)+[^?]*\?.*\b(?:play|watch)=(?P<id>[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12})z[http://cwtv.com/shows/arrow/legends-of-yesterday/?play=6b15e985-9345-4f60-baf8-56e96be57c63z$6b15e985-9345-4f60-baf8-56e96be57c63mp4zLegends of YesterdayzOliver and Barry Allen take Kendra Saunders and Carter Hall to a remote location to keep them hidden from Vandal Savage while they figure out how to defeat him.ii
  Arrow   4   20151203i4_V)idexttitledescriptiondurationseriesseason_numberseasonepisode_numberupload_date	timestampskip_downloadTz(redirect to http://cwtv.com/shows/arrow/)url	info_dictparamsskipzkhttp://www.cwseed.com/shows/whose-line-is-it-anyway/jeff-davis-4/?play=24282b12-ead2-42f2-95ad-26770c2c6088r   z$24282b12-ead2-42f2-95ad-26770c2c6088r   r   zJeff Davis 4r   z%Jeff Davis is back to make you laugh.r   i  r   zWhose Line Is It Anyway?r      r      r   20151006r   i$TV	age_limit   uploaderCWTV	thumbnailzre:^https?://.*\.jpe?g$chapterszcount:4episodez
Episode 20r   z	Season 11)r   r    r!   zRhttp://cwtv.com/thecw/chroniclesofcisco/?play=8adebe35-f447-465f-ab52-e863506ff6d6)r   only_matchingzIhttp://cwtvpr.com/the-cw/video?watch=9eee3f60-ef4e-440b-b3b2-49428ac9c54ez\http://cwtv.com/shows/arrow/legends-of-yesterday/?watch=6b15e985-9345-4f60-baf8-56e96be57c63c                    | j                  |      }| j                  d|z   |      }|j                  d      dk7  rt        |d   d      |d   }|d   }|j                  d	      xs d
|z  }t	        |j                  d            }t	        |j                  d            }|r|r|t        |      d  }d||t        |ddi      |j                  d      t        |j                  d            |j                  d      t        |      t        |      t        |j                  d            t        |j                  d            d|j                  d      dS )NzChttp://images.cwtv.com/feed/mobileapp/video-meta/apiversion_8/guid_resultokmsgT)expectedvideor   mpx_urlzGhttp://link.theplatform.com/s/cwtv/media/guid/2703454149/%s?formats=M3Ur   r,   url_transparentforce_smil_urldescription_longduration_secsseries_name
start_timeratingThePlatformlarge_thumbnail)_typer   r   r   r   r   r   r   r   r   r&   ie_keyr*   )
	_match_id_download_jsongetr   r
   lenr	   r   r   r   )	selfr   video_iddata
video_datar   r4   r   r,   s	            7/usr/lib/python3/dist-packages/yt_dlp/extractor/cwtv.py_real_extractzCWTVIE._real_extractE   sS   >>#&""QT\\ 88H% et<<']
7#..+  D/x  |D  0DZ^^H56jnnY78vc&kl+G 'w)94(@A%>>*<=#JNN?$CD nn]3(0)'2&z~~l'CD()AB##(9:
 	
    N)__name__
__module____qualname__
_VALID_URL_TESTSrI    rJ   rH   r   r      s`    vJl8+ ~%#
 T
 ;'* }
8
5
 ^
 B	

 
 0
 R
 b
 :
 
 
 
 3
 	
 |
  k!
( T
)2 d [ ne5Fn
rJ   r   N)
commonr   utilsr   r   r   r   r	   r
   r   rP   rJ   rH   <module>rS      s     ! W
] W
rJ   