U
    gN                     @   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-66e69Zmp3Z20240118u/   Afsnit 1: “Det føltes som en kidnapning.” Z20240116Z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extZmodified_datetitleZupload_dateuploader_idmodified_timestamprelease_timestampuploader_urluploaderZrelease_date	thumbnaildescription	timestamp	series_id)urlZ	info_dictc           	      C   sf  |  |dd\}}| ||}| ||d d }t|d}g }t|dddd	thfD ]}||d
d qZt|||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| 
d#d$d%g|| 
d&d'd(g|| 
d)d*g|| 
dg|t	| 
d+g|d,| j||dd-S ).Nr	   r   propsZ	pageProps)ZinitialStateconsumestoryr   story_contentmetaZ
audioFiles.none)r   Zvcodec)r	   formatsr   ))r   contentr   r   )sharername)r   Z	sharer_id)r   r   ZsocialDescription)r   r   ZseriesIdZpublished_atZ
revised_at)r   r   r   r   r   r   r   F)get_allZmetaInfo))r   r   )ldZheadline)ogog:title)r"   twitter:title))r   r   )r!   r   )r"   og:description)r"   twitter:description))r   author)r!   r'   r   r!   r'   r   ))r!   image)r"   og:image)r"   twitter:imageZdateModifiedZdatePublishedZdateCreated)r   r   r   r   r   r   r   r   r   r#   r$   r   r%   r&   r)   r*   zarticle:published_time)r   r   r   r   r   )fatal)Z_match_valid_urlgroupZ_download_webpageZ_search_nextjs_datar   r   appendr   strr   Z_html_search_metaZ_search_json_ld)	selfr   Z
display_idr   ZwebpageZnext_js_dataZ
story_datar   Z	audio_url r0   </tmp/pip-unpacked-wheel-q5ljy6pj/yt_dlp/extractor/zetland.py_real_extract   s\    




	
z ZetlandDKArticleIE._real_extractN)__name__
__module____qualname__Z
_VALID_URLZ_TESTSr2   r0   r0   r0   r1   r      s(   r   N)	commonr   utilsr   r   r   Zutils.traversalr   r   r0   r0   r0   r1   <module>   s   