U
    g                     @   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/4728Z d4a437aec45d8d796a38a215db064e9aZ4728ZmovzHistoric Films: GP-7z$md5:1a86a0f3ac54024e419aba97210d959azre:^https?://.*\.jpg$i0  )idexttitledescription	thumbnailduration)urlmd5Z	info_dictc           
      C   s   |  |}| ||}| ddg|d}| |}| |}| d|dpR| |}t| d|d}d| d| d	}	||	||||d
S )Nzclass="tapeId"[^>]*>([^<]+)<ztapeId\s*:\s*"([^"]+)"ztape idZthumbnailUrlZ
thumbnailsr   z#http://www.historicfilms.com/video/_z_web.mov)r   r   r   r	   r
   r   )Z	_match_idZ_download_webpageZ_search_regexZ_og_search_titleZ_og_search_descriptionZ_html_search_metaZ_og_search_thumbnailr   )
selfr   Zvideo_idZwebpageZtape_idr   r	   r
   r   Z	video_url r   B/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/historicfilms.py_real_extract   s:    
 

    zHistoricFilmsIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTr   r   r   r   r   r      s   r   N)commonr   utilsr   r   r   r   r   r   <module>   s   