U
    g'                     @   s4   d dl mZ ddlmZmZmZ G dd deZdS )   )InfoExtractor   )determine_extint_or_nonemimetype2extc                
   @   s4   e Zd ZdZdddddddd	d
ddZdd ZdS )
TweakersIEz(https?://tweakers\.net/video/(?P<id>\d+)zNhttps://tweakers.net/video/9926/new-nintendo-3ds-xl-op-alle-fronten-beter.htmlZ fe73e417c093a788e0160c4025f88b15Z9926Zmp4z+New Nintendo 3DS XL - Op alle fronten beterz$md5:3789b21fed9c0219e9bcaacd43fab280zre:^https?://.*\.jpe?g$i  Zs7JeEm)idexttitledescription	thumbnaildurationuploader_id)urlmd5Z	info_dictc              
   C   s   |  |}| d| d|d d }|d }g }|di dg D ]x}|d}t|d	}t|d
}	|dg D ]@}
|
d}|sq|t|
dpt|}|||||	|d q|qF|||d|dt|d|d|dS )Nz&https://tweakers.net/video/s1playlist/z/1920/1080/playlist.jsonitems    r
   	locationsZprogressivelabelwidthheightsourcessrctype)	format_idr   r   r   r	   r   Zposterr   account)r   r
   r   r   r   r   formats)Z	_match_idZ_download_jsongetr   r   r   append)selfr   Zvideo_idZ
video_datar
   r   locationr   r   r   source
source_urlr	    r#   =/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/tweakers.py_real_extract   sF    



	zTweakersIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTr%   r#   r#   r#   r$   r   	   s   r   N)commonr   utilsr   r   r   r   r#   r#   r#   r$   <module>   s   