o
    i~	                     @   s4   d dl mZ ddlmZmZmZ G dd deZdS )   )InfoExtractor   )parse_durationparse_filesize
str_to_intc                
   @   sP   e Zd ZdZdddddddd	d
dgddddddddd	d
dgZdd ZdS )SnotrIEz6http?://(?:www\.)?snotr\.com/video/(?P<id>\d+)/([\w]+)z?http://www.snotr.com/video/13708/Drone_flying_through_fireworks13708mp4zDrone flying through fireworks!   i`mz/A drone flying through Fourth of July Fireworkszre:^https?://.*\.jpg$)idexttitledurationfilesize_approxdescription	thumbnailr   )url	info_dictexpected_warningszDhttp://www.snotr.com/video/530/David_Letteman_-_George_W_Bush_Top_10530z&David Letteman - George W. Bush Top 10~   i  zEThe top 10 George W. Bush moments, brought to you by David Letterman!)r   r   c              	   C   s   |  |}|d}| ||}| |}| |}| j|||ddd }t| jd|ddd}t| jd	|d
dd}	t	| jd|ddd}
|
|||||	|
d |S )Nr   m3u8_native)m3u8_entry_protocol    z?<p[^>]*>\s*<strong[^>]*>Views:</strong>\s*<span[^>]*>([\d,\.]+)z
view countF)fatalz><p[^>]*>\s*<strong[^>]*>Length:</strong>\s*<span[^>]*>([\d:]+)r   z?<p[^>]*>\s*<strong[^>]*>Filesize:</strong>\s*<span[^>]*>([^<]+)filesize)r   r   r   
view_countr   r   )_match_valid_urlgroup_download_webpage_og_search_title_og_search_description_parse_html5_media_entriesr   _html_search_regexr   r   update)selfr   mobjvideo_idwebpager   r   r   r   r   r    r)   J/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/snotr.py_real_extract$   s>   



	zSnotrIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTSr+   r)   r)   r)   r*   r   	   s2    	r   N)commonr   utilsr   r   r   r   r)   r)   r)   r*   <module>   s    