o
    i                     @   s8   d dl mZ ddlmZ ddlmZ G dd deZdS )   )InfoExtractor   )url_or_none)traverse_objc                   @   s4   e Zd ZdZddddddg dd	d
Zdd ZdS )SenIEz4https?://(?:www\.)?sen\.com/video/(?P<id>[0-9a-f-]+)z>https://www.sen.com/video/eef46eb1-4d79-4e28-be9d-bd937767f8c4 ff615aca9691053c94f8f10d96cd7884z$eef46eb1-4d79-4e28-be9d-bd937767f8c4mp4zFlorida, 28 Sep 2022zHurricane Ian)zNorth AmericaStormWeather)idextdescriptiontitletags)urlmd5	info_dictc                 C   s   |  |}| d| |}t|dddd ddthtfp"d| d	}|| ||d
dt|dddd tdddthfdddthfdddthfdfS )Nz)https://api.sen.com/content/public/video/datanodesc                 S      |d dkS )Nr   player _vr   r   H/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/sen.py<lambda>       z%SenIE._real_extract.<locals>.<lambda>videor   zhttps://vod.sen.com/videos/z/manifest.m3u8r   )r   formatsc                 S   r   )Nr   detailsr   r   r   r   r   r      r   contentr   textdescriptions    badges.)r   r   r   )	_match_id_download_jsonr   r   any_extract_m3u8_formatsstr)selfr   video_idapi_datam3u8_urlr   r   r   _real_extract   s    


zSenIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTr/   r   r   r   r   r      s    r   N)commonr   utilsr   utils.traversalr   r   r   r   r   r   <module>   s    