
    VGh4                     J    d dl mZ d dlmZ ddlmZ ddlmZ  G d de      Zy)	   )BrightcoveNewIE)InfoExtractor   )ExtractorError)traverse_objc                       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$ Zy%)&
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           
      @   | j                  |      }| j                  ||      }| j                  d|d|      }t        |dddt        hfdddd	 d
t        hfd      }t        |ddddt        hfd      }|r|st        d      | j                  d| d| t        |      S )Nzvar\s+__INITIAL_STATE__\s*=zinitial state
videoIndexcurrentVideobrightcoveIdarticle.mediac                     |d   dk(  S )Ntypevideo )_vs     b/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/extractor/ninenews.py<lambda>z*NineNewsIE._real_extract.<locals>.<lambda>?   s    1V93G     urnF)get_allconfig)Nr1   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_idr;   s          r5   _real_extractzNineNewsIE._real_extract8   s    ^^C(
((j9))*G_jRL..3%PW&GQTPUV`eg }(OY/GPUW w !HII-gY6Z[cZdeX' 	'r7   N)__name__
__module____qualname__IE_NAME
_VALID_URL_TESTSrF   r2   r7   r5   r	   r	      s    G`J C1!E{?#%)y
  w1!QA?#%) D
  ]![A?#%)s
=,F\'r7   r	   N)	
brightcover   commonr   utilsr   utils.traversalr   r	   r2   r7   r5   <module>rQ      s    ' ! " *A' A'r7   