o
    iN                     @   s@   d dl mZ ddlmZmZmZ ddlmZ G dd deZdS )   )InfoExtractor   )merge_dictsunified_timestampurl_or_none)traverse_objc                   @   sD   e Zd ZdZdddddddd	d
dddddd
dddgZdd ZdS )ZetlandDKArticleIEzZhttps?://www\.zetland\.dk/\w+/(?P<id>(?P<story_id>\w{8})-(?P<uploader_id>\w{8})-(?:\w{5}))zuhttps://www.zetland.dk/historie/sO9aq2MY-a81VP3BY-66e69?utm_source=instagram&utm_medium=linkibio&utm_campaign=artikelzsO9aq2MY-a81VP3BY-66e69mp320240118u/   Afsnit 1: “Det føltes som en kidnapning.” 20240116a81VP3BYiei8ez(https://www.zetland.dk/skribent/a81VP3BYzHelle FuusagerzXre:https://zetland\.imgix\.net/2aafe500-b14e-11ee-bf83-65d5e1283a57/Zetland_Image_1\.jpgz$md5:9619d426772c133f5abb26db27f26a01z$62d54630-e87b-4ab1-a255-8de58dbe1b14)idextmodified_datetitleupload_dateuploader_idmodified_timestamprelease_timestampuploader_urluploaderrelease_date	thumbnaildescription	timestamp	series_id)url	info_dictc           	      C   sb  |  |dd\}}| ||}| ||d d }t|d}g }t|dddd	thfD ]
}||d
d q-t|||dt|dthfdddddt	hfdt	hfdddt|ddthfdthfdthfdddthfdthfddt	hfdd t	hfdd!t	hfd"fdd| 
g d#|| 
g d$|| 
d%d&g|| 
dg|t	| 
d'g|d(| j||dd)S )*Nr   r   props	pageProps)initialStateconsumestoryr"   story_contentmeta
audioFiles.none)r   vcodec)r   formatsr   ))r#   contentr   r   )sharername)r*   	sharer_id)r#   r)   socialDescription)r#   r$   seriesIdpublished_at
revised_at)r   r   r   r   r   r   r   F)get_allmetaInfo))r$   r   )ldheadline)ogog:title)r5   twitter:title))r$   r   )r3   r   )r5   og:description)r5   twitter:description))r$   author)r3   r:   r+   r3   r:   r   ))r3   image)r5   og:image)r5   twitter:imagedateModifieddatePublisheddateCreated)r   r   r   r   r   r   r   r   )r   r6   r7   )r   r8   r9   r<   r=   zarticle:published_time)r   r   r   r   r   )fatal)_match_valid_urlgroup_download_webpage_search_nextjs_datar   r   appendr   strr   _html_search_meta_search_json_ld)	selfr   
display_idr   webpagenext_js_data
story_datar(   	audio_url rP   L/home/ubuntu/.local/lib/python3.10/site-packages/yt_dlp/extractor/zetland.py_real_extract   s\   




	
z ZetlandDKArticleIE._real_extractN)__name__
__module____qualname__
_VALID_URL_TESTSrR   rP   rP   rP   rQ   r      s*    r   N)	commonr   utilsr   r   r   utils.traversalr   r   rP   rP   rP   rQ   <module>   s    