3
b`                 @   sP   d dl mZ d dlZddlmZ ddlmZ ddlmZm	Z	 G dd	 d	eZ
dS )
    )unicode_literalsN   )InfoExtractor   )
compat_str)int_or_noneExtractorErrorc               @   s   e Zd ZdZdZdZdddddd	d
ddddeeedddddddgdddddddddddd d!d"eeed#d$d%d&d'd(d)gdd*dd+d,d-dd.d/d0d1d2d3d4eeed5d6d7d8gdd*dd9d:d;dd<d=d>d?d@dAdBeeedCd%dDdEd&dFdGgdd*dgZdHdI ZdJS )KVubeIEvubezVube.comz6https?://vube\.com/(?:[^/]+/)+(?P<id>[\da-zA-Z]{10})\bz3http://vube.com/trending/William+Wei/Y8NUZ69Tf7?t=sZ e7aabe1f8f1aa826b9e4735e1f9cee42Z
Y8NUZ69Tf7mp4zBest Drummer Ever [HD]z$md5:2d63c4b277b85c2277761c2cf7337d71zre:^https?://.*\.jpgZWilliami<SZ20140801gA` p@Zamazinghdzbest drummer everzwilliam weizbucket drummingzstreet drummerzepic street drumming)idexttitledescription	thumbnailuploader	timestampupload_dateduration
like_countdislike_countcomment_count
categoriesz$Not accessible from Travis CI server)urlmd5	info_dictskipz6http://vube.com/Chiara+Grispo+Video+Channel/YL2qNPkqonZ db7aba89d4603dadd627e9d1973946feZ
YL2qNPkqonz%Chiara Grispo - Price Tag by Jessie Jz$md5:8ea652a1f36818352428cb5134933313z_re:^http://frame\.thestaticvube\.com/snap/[0-9x]+/102e7e63057-5ebc-4f5c-4065-6ce4ebde131f\.jpg$zChiara.GrispoiRZ20140103gRQe@popmusiccoverZsingingzjessie jz	price tagzchiara grispozRemoved due to DMCAzdhttp://vube.com/SerainaMusic/my-7-year-old-sister-and-i-singing-alive-by-krewella/UeBhTudbfS?t=s&n=1Z 5d4a52492d76f72712117ce6b0d98d08Z
UeBhTudbfSz6My 7 year old Sister and I singing "Alive" by Krewellaz$md5:40bcacb97796339f1690642c21d56f4az_re:^http://frame\.thestaticvube\.com/snap/[0-9x]+/102265d5a9f-0f17-4f6b-5753-adf08484ee1e\.jpg$ZSerainai<S20140403gCln@ZserainaZjessicaZkrewellaalivez2http://vube.com/vote/Siren+Gene/0nmsMY5vEq?n=2&t=sZ 0584fc13b50f887127d9d1007589d27fZ
0nmsMY5vEqz&Frozen - Let It Go Cover by Siren Genez<My rendition of "Let It Go" originally sung by Idina Menzel.z_re:^http://frame\.thestaticvube\.com/snap/[0-9x]+/10283ab622a-86c9-4681-51f2-30d1f65774af\.jpg$ZSireni,S20140322gK7k@z	let it gozidina menzelfrozendisneyz
siren genec             C   s  t j| j|}|jd}| jd| |d}|d }g }x|d jdg |d jdg  D ]l}|d d	krjqXd
|d |f t|d t|d d}t|d }	|	r|j|	t|d d |j	| qXW | j
| | r|jddkrtddd|d }
|jd}| j|jddd}|jdp,|jd}t|jd}|d }|jd}|jd }|jd!}|jd"}d }|d kr| jd#| |d$d%d&}|d k	rt|jd'}nt|}d(d) |d* D }|||
||||||||||d+S ),Nr   z!http://vube.com/t-api/v1/video/%szDownloading video JSON	public_idmediavideoaudioZtranscoding_status	processedz.http://video.thestaticvube.com/video/%s/%s.mp4Zmedia_resolution_idaudio_bitrate)r   abr	format_idvideo_bitrateheight)vbrr/   ZvstZdmcaznThis video has been removed in response to a complaint received under the US Digital Millennium Copyright Act.T)expectedr   r   thumbnail_srczhttp:)schemeZ
user_aliaschannelupload_timer   Zraw_view_countZtotal_likesZtotal_hatescommentsz$http://vube.com/api/video/%s/commentzDownloading video comment JSONF)fataltotalc             S   s   g | ]}|d  qS )text ).0tagr:   r:   EC:\Users\Broad\Desktop\All-Down\binaries\youtube_dl\extractor\vube.py
<listcomp>   s    z(VubeIE._real_extract.<locals>.<listcomp>tags)r   formatsr   r   r   r   r   r   
view_countr   r   r   r   )rematch
_VALID_URLgroup_download_jsongetintr   updateappend_sort_formatsr   _proto_relative_urlr   len)selfr   mobjvideo_idr(   r&   r@   r'   fmtr0   r   r   r   r   r   r   rA   r   r   r6   r   Zcomment_datar   r:   r:   r=   _real_extracte   sn    
&








zVubeIE._real_extractN)	__name__
__module____qualname__IE_NAMEIE_DESCrD   rH   _TESTSrR   r:   r:   r:   r=   r	      s   
r	   )
__future__r   rB   commonr   compatr   utilsr   r   r	   r:   r:   r:   r=   <module>   s
   