U
    g                     @   s    d dl mZ G dd deZdS )   )InfoExtractorc                   @   sN   e Zd ZdZdddddddd	d
dddd
gdgddddddgZdd ZdS )CTVIEzAhttps?://(?:www\.)?ctv\.ca/(?P<id>(?:show|movie)s/[^/]+/[^/?#&]+)zFhttps://www.ctv.ca/shows/your-morning/wednesday-december-23-2020-s5e88Z2102249ZflvzWednesday, December 23, 2020zre:^https?://.*\.jpg$z^Your Morning delivers original perspectives and unique insights into the headlines of the day.i`M_Z20201223zYour Morningz	2020-2021   X   z	Talk ShowgL7A +@)idexttitleZ	thumbnaildescription	timestampZupload_dateZseriesZseasonZseason_numberZepisode_numbertags
categoriesduration)urlZ	info_dictz[https://www.ctv.ca/movies/adam-sandlers-eight-crazy-nights/adam-sandlers-eight-crazy-nightsT)r   Zonly_matchingc                 C   sT   |  |}| jd|dd| idd d d d }|d	 }| d
|d |d|S )Nz(https://www.ctv.ca/space-graphql/graphqlqueryz{
  resolvedPath(path: "/%s") {
    lastSegment {
      content {
        ... on AxisContent {
          axisId
          videoPlayerDestCode
        }
      }
    }
  }
})r   dataZresolvedPathZlastSegmentcontentZaxisIdz9c9media:{}:{}ZvideoPlayerDestCodeZNineCNineMedia)Z	_match_idZ_download_jsonZ
url_resultformat)selfr   Z
display_idr   Zvideo_id r   8/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/ctv.py_real_extract   s0    
   zCTVIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTSr   r   r   r   r   r      s.   r   N)commonr   r   r   r   r   r   <module>   s   