U
    $Pf	                     @   sD   d dl mZ ddlmZ ddlmZmZ d dlZG dd deZdS )	    )unicode_literals   )InfoExtractor   )parse_iso8601	qualitiesNc                   @   s8   e Zd ZdZdddddddd	d
ddd	dZdd ZdS )	ClippitIEz3https?://(?:www\.)?clippituser\.tv/c/(?P<id>[a-z]+)z"https://www.clippituser.tv/c/evmgmZ 963ae7a59a2ec4572ab8bf2f2d2c5f09ZevmgmZmp4z&Bye bye Brutus. #BattleBots  - ClippitZlizllovez%https://www.clippituser.tv/p/lizllovei
WZ20160826zBattleBots | ABCzre:^https?://.*\.jpg$)	idexttitleuploaderuploader_url	timestampZupload_datedescription	thumbnail)urlmd5Z	info_dictc              
   C   s   |  |}| ||}| d|d}d}t|}g }|D ]V}| jd| |ddd}|sXq8td|}	||||||	rt|	d	nd d
 q8| jd|ddd}
|
rd|
 nd }| jd|ddd}| jd|ddd}||||
|t	|| 
||dS )Nz<title.*>(.+?)</title>r   )sdZhdzdata-%s-file="(.+?)"r   F)fatalz/(?P<height>\d+)\.mp4height)r   	format_idqualityr   zclass="username".*>\s+(.+?)\nr   zhttps://www.clippituser.tv/p/zdatetime="(.+?)"datezdata-image="(.+?)"r   )r	   r   formatsr   r   r   r   r   )Z	_match_idZ_download_webpageZ_html_search_regexr   researchappendintgroupr   Z_og_search_description)selfr   Zvideo_idZwebpager   ZFORMATSr   r   r   matchr   r   r   r    r!   @/tmp/pip-unpacked-wheel-7zdooeg3/youtube_dl/extractor/clippit.py_real_extract!   sb    

  
  
    zClippitIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTr#   r!   r!   r!   r"   r      s   r   )	
__future__r   commonr   utilsr   r   r   r   r!   r!   r!   r"   <module>   s   