3
b`
                 @   s@   d dl mZ d dlZddlmZ ddlmZ G dd deZdS )	    )unicode_literalsN   )InfoExtractor   )parse_durationc               @   s0   e Zd ZdZdddddddd	d
Zdd ZdS )NuvidIEz3https?://(?:www|m)\.nuvid\.com/video/(?P<id>[0-9]+)z!http://m.nuvid.com/video/1310741/Z eab207b7ac4fccfb4e23c86201f11277Z1310741mp4z)Horny babes show their awesome bodeis and      )idexttitleduration	age_limit)urlmd5	info_dictc             C   s   | j |}d| }| j||d}| jddd | j||d}d}| j|||}| j|||}d|ig}	||kr||	jd|i | jd	d
dg|dj }
dd tjd|D }|r|d d nd }t| jddg|ddd}||
|||d|	dS )Nzhttp://m.nuvid.com/video/%szDownloading video pagez	nuvid.comZdwnld_speedz10.0z%Downloading video page for MP4 formatD(?s)<(?:video|audio)[^<]*(?:>.*?<source[^>]*)?\s+src=["\'](.*?)["\']r   z<span title="([^"]+)">z8<div class="thumb-holder video">\s*<h5[^>]*>([^<]+)</h5>z,<span[^>]+class="title_thumb">([^<]+)</span>r   c             S   s   g | ]}d |iqS )r    ).0	thumb_urlr   r   FC:\Users\Broad\Desktop\All-Down\binaries\youtube_dl\extractor\nuvid.py
<listcomp>6   s   z)NuvidIE._real_extract.<locals>.<listcomp>z<img src="([^"]+)" alt="" />r   z-<i class="fa fa-clock-o"></i>\s*(\d{2}:\d{2})z*<span[^>]+class="view_time">([^<]+)</span>r   F)fatalr
   )r   r   
thumbnails	thumbnailr   r   formats)r   )		_match_id_download_webpage_set_cookie_html_search_regexappendstriprefindallr   )selfr   video_idpage_urlwebpageZmp4_webpageZhtml5_video_re	video_urlZmp4_video_urlr   r   r   r   r   r   r   r   _real_extract   s>    




zNuvidIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTr*   r   r   r   r   r      s   r   )
__future__r   r#   commonr   utilsr   r   r   r   r   r   <module>   s   