o
    i,                     @   s0   d dl mZ ddlmZmZ G dd deZdS )   )InfoExtractor   )int_or_nonetraverse_objc                	   @   s:   e Zd ZdZdddddddgg d	d
dgZdd ZdS )PremiershipRugbyIEz@https?://(?:\w+\.)premiershiprugby\.(?:com)/watch/(?P<id>[\w-]+)zPhttps://www.premiershiprugby.com/watch/full-match-harlequins-v-newcastle-falcons
0_mbkb7ldtz*Full Match: Harlequins v Newcastle Falconsmp4zhttps://open.http.mp.streamamg.com/p/3000914/sp/300091400/thumbnail/entry_id/0_mbkb7ldt//width/960/height/540/type/1/quality/75g     ͷ@video)z
Full Match
HarlequinszNewcastle Falconszgallaher premiership)idtitleext	thumbnaildurationtags
categories)url	info_dictc                 C   s   |  |}| jd| |ddidd d }| |d d d	 |\}}|d d d
 |t|d||t|dtt|ddd|dt|dd	S )Nz;https://article-cms-api.incrowdsports.com/v2/articles/slug/clientIdPRL)querydataarticle	heroMediacontent	videoLinksourceSystemId)r   r   )r   r   videoThumbnail)r   r   metadata
msDurationi  )scaler   )r   .text)	r   
display_idr   formats	subtitlesr   r   r   r   )	_match_id_download_json#_extract_m3u8_formats_and_subtitlesr   r   get)selfr   r"   	json_datar#   subs r,   U/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/premiershiprugby.py_real_extract   s,   
z PremiershipRugbyIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTSr.   r,   r,   r,   r-   r      s    r   N)commonr   utilsr   r   r   r,   r,   r,   r-   <module>   s    