U
    g4                     @   sD   d dl mZ d dlmZ ddlmZ ddlmZ G dd deZdS )	   )BrightcoveNewIE)InfoExtractor   )ExtractorError)traverse_objc                   @   s   e Zd ZdZdZddddddd	d
dddddddddgd
dddddddddddddddd d!dgd
dd"d#dd$d%d&d'd(ddddd)d*d+dgd
d,gZd-d. Zd/S )0
NineNewsIEZ9NewszLhttps?://(?:www\.)?9news\.com\.au/(?:[\w-]+/){2,3}(?P<id>[\w-]+)/?(?:$|[?#])zqhttps://www.9news.com.au/videos/national/fair-trading-pulls-dozens-of-toys-from-shelves/clqgc7dvj000y0jnvfism0w5mZ d1a65b2e9d126e5feb9bc5cb96e62c80Z6343717246112Zmp4z.Fair Trading pulls dozens of toys from shelvesz^Fair Trading Australia have been forced to pull dozens of toys from shelves over hazard fears.z$md5:bdbe44294e2323b762d97acf8843f66cg\(\W@iAeZ20231222Z664969388001ZnetworkclipZaunews_aunationalninenewszchristmas presentsZtoyszfair tradingZau_news)
idexttitledescriptionZ	thumbnailduration	timestampZupload_dateZuploader_idtags)urlmd5	info_dictzhttps://www.9news.com.au/world/tape-reveals-donald-trump-pressured-michigan-officials-not-to-certify-2020-vote-a-new-report-says/0b8b880e-7d3c-41b9-b2bd-55bc7e492259Z a885c44d20898c3e70e9a53e8188cea1Z6343587450112z:Trump found ineligible to run for president by state courtz$md5:40e6e7db7a4ac6be0e960569a5af6066z$md5:3e132c48c186039fd06c10787de9bff2g)\(Z@ireZ20231220Z
ineligiblezpresidential candidatezdonald trumpzhttps://www.9news.com.au/national/outrage-as-parents-banned-from-giving-gifts-to-kindergarten-teachers/e19b49d4-a1a4-4533-9089-6e10e2d9386aZ6343716797112zDOutrage as parents banned from giving gifts to kindergarten teachersz$md5:7a8b0ed2f9e08875fd9a3e86e462bc46z$md5:5ee4d66717bdd0dee9fc9a705ef041b8gSV@i8eZpresentsZteachersZkindergarten)r   r   c              	   C   s   |  |}| ||}| d|d|}t|dddthfdddd	d
 dthfdd}t|ddddthfdd}|rt|s|td| d| d| t|S )Nzvar\s+__INITIAL_STATE__\s*=zinitial stateZ
videoIndexZcurrentVideoZbrightcoveIdarticle.Zmediac                 S   s   |d dkS )Ntypevideo )_vr   r   =/tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/ninenews.py<lambda>?       z*NineNewsIE._real_extract.<locals>.<lambda>ZurnF)get_allconfig)Nr   accountz%Unable to get the required video datazhttps://players.brightcove.net/z$/default_default/index.html?videoId=)Z	_match_idZ_download_webpageZ_search_jsonr   strr   Z
url_resultr   )selfr   Z
article_idZwebpageZinitial_stateZvideo_idr   r   r   r   _real_extract8   s<    
          zNineNewsIE._real_extractN)__name__
__module____qualname__ZIE_NAMEZ
_VALID_URLZ_TESTSr    r   r   r   r   r      sZ   .r   N)	Z
brightcover   commonr   utilsr   Zutils.traversalr   r   r   r   r   r   <module>   s   