o
    i4                     @   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g 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g d"d
d#gZd$d% Zd&S )'
NineNewsIE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/clqgc7dvj000y0jnvfism0w5m d1a65b2e9d126e5feb9bc5cb96e62c806343717246112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Ae20231222664969388001)networkclipaunews_aunationalninenewszchristmas presentstoyszfair tradingau_news)
idexttitledescription	thumbnailduration	timestampupload_date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-55bc7e492259 a885c44d20898c3e70e9a53e8188cea16343587450112z:Trump found ineligible to run for president by state courtz$md5:40e6e7db7a4ac6be0e960569a5af6066z$md5:3e132c48c186039fd06c10787de9bff2g)\(Z@ire20231220)r   r   
ineligiblezpresidential candidatezdonald trumpr   zhttps://www.9news.com.au/national/outrage-as-parents-banned-from-giving-gifts-to-kindergarten-teachers/e19b49d4-a1a4-4533-9089-6e10e2d9386a6343716797112zDOutrage as parents banned from giving gifts to kindergarten teachersz$md5:7a8b0ed2f9e08875fd9a3e86e462bc46z$md5:5ee4d66717bdd0dee9fc9a705ef041b8gSV@i8e)r   r   presentsteacherskindergartenr   )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}|r:|s>td| d| d| t|S )Nzvar\s+__INITIAL_STATE__\s*=zinitial state
videoIndexcurrentVideobrightcoveIdarticle.mediac                 S   s   |d dkS )Ntypevideo )_vr.   r.   M/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/ninenews.py<lambda>?   s    z*NineNewsIE._real_extract.<locals>.<lambda>urnF)get_allconfig)Nr-   accountz%Unable to get the required video datazhttps://players.brightcove.net/z$/default_default/index.html?videoId=)	_match_id_download_webpage_search_jsonr   strr   
url_resultr   )selfr   
article_idwebpageinitial_statevideo_idr6   r.   r.   r1   _real_extract8   s(   
zNineNewsIE._real_extractN)__name__
__module____qualname__IE_NAME
_VALID_URL_TESTSrA   r.   r.   r.   r1   r      s\    .r   N)	
brightcover   commonr   utilsr   utils.traversalr   r   r.   r.   r.   r1   <module>   s
    