o
    i                     @   s,   d dl mZ ddlmZ G dd deZdS )   )InfoExtractor   )parse_durationc                	   @   s2   e Zd ZdZdddddddd	d
dZdd ZdS )HistoricFilmsIEz@https?://(?:www\.)?historicfilms\.com/(?:tapes/|play)(?P<id>\d+)z'http://www.historicfilms.com/tapes/4728 d4a437aec45d8d796a38a215db064e9a4728movzHistoric Films: GP-7z$md5:1a86a0f3ac54024e419aba97210d959azre:^https?://.*\.jpg$i0  )idexttitledescription	thumbnailduration)urlmd5	info_dictc           
      C   s   |  |}| ||}| ddg|d}| |}| |}| d|dp)| |}t| d|d}d| d| d	}	||	||||d
S )Nzclass="tapeId"[^>]*>([^<]+)<ztapeId\s*:\s*"([^"]+)"ztape idthumbnailUrl
thumbnailsr   z#http://www.historicfilms.com/video/_z_web.mov)r	   r   r   r   r   r   )	_match_id_download_webpage_search_regex_og_search_title_og_search_description_html_search_meta_og_search_thumbnailr   )
selfr   video_idwebpagetape_idr   r   r   r   	video_url r!   R/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/historicfilms.py_real_extract   s0   


zHistoricFilmsIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTr#   r!   r!   r!   r"   r      s    r   N)commonr   utilsr   r   r!   r!   r!   r"   <module>   s    