U
    gX                     @   s8   d dl mZ d dlmZ d dlmZ G dd deZdS )   )InfoExtractor)DailymotionIE)	YoutubeIEc                   @   s   e Zd ZdZdddddeeddd	ed
ddddddedgdddddddddddddeedddeddddddd dgdd!d"ed#d$dgZd%d& Zd'S )(GMANetworkVideoIEzUhttps?://(?:www)\.gmanetwork\.com/(?:\w+/){3}(?P<id>\d+)/(?P<display_id>[\w-]+)/videozhttps://www.gmanetwork.com/fullepisodes/home/running_man_philippines/168677/running-man-philippines-catch-the-thief-full-chapter-2/video?section=homeZ28BqW0AXPe0Zmp4Z20220919z7http://www.youtube.com/channel/UChsoPNR5x-wdSO2GrOSIWqQu   YoüLOLzUChsoPNR5x-wdSO2GrOSIWqQi  zcount:22z9Running Man Philippines: Catch the Thief (FULL CHAPTER 2)z8https://www.youtube.com/channel/UChsoPNR5x-wdSO2GrOSIWqQz4https://i.ytimg.com/vi/28BqW0AXPe0/maxresdefault.jpgin(c    ZEntertainmentz$md5:811bdcea74f9c48051824e494756e926Znot_liveTpublic)idextupload_dateuploader_url
like_count
view_countuploader
channel_iddurationcomment_counttagsuploader_idtitlechannel_url	thumbnailZrelease_timestamp	age_limitchannel_follower_count
categoriesdescriptionlive_statusplayable_in_embedchannelavailabilityZrelease_date)urlZ	info_dictzuhttps://www.gmanetwork.com/fullepisodes/home/more_than_words/87059/more-than-words-full-episode-80/video?section=homeZyiDOExw2aSAZ
GMANetworkz$md5:6d00cd658394fa1a5071200d3ed4be05i  Z20181003z:https://i.ytimg.com/vi_webp/yiDOExw2aSA/maxresdefault.webpZUCKL5hAuzgFQsyrsQKgU0Qngz)More Than Words: Full Episode 80 (Finale)Z
GMANETWORKz8https://www.youtube.com/channel/UCKL5hAuzgFQsyrsQKgU0Qngzcount:29z&http://www.youtube.com/user/GMANETWORK)r   r	   r   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   c                 C   s   |  |dd\}}| ||}| jd|ddd}|rF| |t|S | d|d}| | d	| |}|d
r| |d
 t|d
 S | |d t|d S d S )Nr   
display_idz1var\s*YOUTUBE_VIDEO\s*=\s*[\'"]+(?P<yt_id>[\w-]+)
youtube_idF)fatalz'NETWORK_URL\s*=\s*[\'"](?P<url>[^\'"]+)network_urlzapi/data/content/video/Z
video_fileZdailymotion_file)	Z_match_valid_urlgroupZ_download_webpageZ_search_regexZ
url_resultr   Z_download_jsongetr   )selfr   Z
content_idr    Zwebpager!   r#   Z	json_data r'   ?/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/gmanetwork.py_real_extractB   s&         
zGMANetworkVideoIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLintZ_TESTSr)   r'   r'   r'   r(   r      sr   :r   N)commonr   Zdailymotionr   Zyoutuber   r   r'   r'   r'   r(   <module>   s   