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   )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.html fe73e417c093a788e0160c4025f88b159926mp4z+New Nintendo 3DS XL - Op alle fronten beterz$md5:3789b21fed9c0219e9bcaacd43fab280zre:^https?://.*\.jpe?g$i  s7JeEm)idexttitledescription	thumbnaildurationuploader_id)urlmd5	info_dictc              
   C   s   |  |}| d| d|d d }|d }g }|di dg D ]<}|d}t|d	}t|d
}	|dg D ] }
|
d}|sHq>t|
dpRt|}|||||	|d q>q#|||d|dt|d|d|dS )Nz&https://tweakers.net/video/s1playlist/z/1920/1080/playlist.jsonitems    r   	locationsprogressivelabelwidthheightsourcessrctype)	format_idr   r   r   r   r   posterr   account)r   r   r   r   r   r   formats)	_match_id_download_jsongetr   r   r   append)selfr   video_id
video_datar   r#   locationr    r   r   source
source_urlr    r.   M/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/tweakers.py_real_extract   sH   




zTweakersIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTr0   r.   r.   r.   r/   r   	   s    r   N)commonr   utilsr   r   r   r   r.   r.   r.   r/   <module>   s    