
    V|h                     r    S SK r SSKJr  SSKJrJrJrJr   " S S\5      r " S S	\5      r	 " S
 S\5      r
g)    N   )InfoExtractor   )clean_podcast_urlint_or_nonetry_geturlencode_postdatac                   $    \ rS rSrSrS rS rSrg)GooglePodcastsBaseIE   z$https?://podcasts\.google\.com/feed/c                    ^  [         R                  " T R                  SU[        S[         R                  " U[         R                  " U5      S S///5      05      U 4S jS9S   S   5      $ )Nz:https://podcasts.google.com/_/PodcastsUi/data/batchexecutezf.req1c                 *   > TR                  SU S5      $ )Nz(?s)(\[.+\])data)_search_regex)xselfs    Y/home/james-whalen/.local/lib/python3.13/site-packages/yt_dlp/extractor/googlepodcasts.py<lambda>5GooglePodcastsBaseIE._batch_execute.<locals>.<lambda>   s    4+=+=oqRX+Y    )r   transform_sourcer   r   )jsonloads_download_jsonr	   dumps)r   func_idvideo_idparamss   `   r   _batch_execute#GooglePodcastsBaseIE._batch_execute   s    zz$--H-w

60BD#&N%O$PQ/ !Y	 . [ \]	^ _`	a b 	br   c                     US   S   US   [        US   5      US   US   [        US 5      [        US   5      [        US	   5      US
   S.	$ )N            r   	   c                     U S   $ )N    r   s    r   r   7GooglePodcastsBaseIE._extract_episode.<locals>.<lambda>   s    !B%r      r   r   )	idtitleurl	thumbnaildescriptioncreator	timestampdurationseries)r   r   r   )r   episodes     r   _extract_episode%GooglePodcastsBaseIE._extract_episode   sa    !*Q-QZ$WR[1 "1:w8$WR[1#GBK0aj

 
	
r   r*   N)__name__
__module____qualname____firstlineno___VALID_URL_BASEr    r8   __static_attributes__r*   r   r   r   r      s    =Ob
r   r   c                   Z    \ rS rSrSr\R                  S-   rSSSSSS	S
SSSS.S.rS r	Sr
g)GooglePodcastsIE$   zgoogle:podcastsz,(?P<feed_url>[^/]+)/episode/(?P<id>[^/?&#]+)zhttps://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5ucHIub3JnLzM0NDA5ODUzOS9wb2RjYXN0LnhtbA/episode/MzBlNWRlN2UtOWE4Yy00ODcwLTk2M2MtM2JlMmUyNmViOTRh fa56b2ee8bd0703e27e42d4b104c4766z$30e5de7e-9a8c-4870-963c-3be2e26eb94amp3zWWDTM New Year 2021z]We say goodbye to 2020 with Christine Baranksi, Doug Jones, Jonna Mendez, and Kellee Edwards.20210102i_iU  Wait Wait... Don't Tell Me!)r.   extr/   r2   upload_dater4   r5   r6   )r0   md5	info_dictc                     U R                  U5      R                  5       u  p#U R                  SX2U/5      S   nU R                  U5      $ )NoNjqVer   )_match_valid_urlgroupsr    r8   )r   r0   b64_feed_urlb64_guidr7   s        r   _real_extractGooglePodcastsIE._real_extract6   sQ    !%!6!6s!;!B!B!D%%hx 8::;=$$W--r   r*   Nr:   r;   r<   r=   IE_NAMEr   r>   
_VALID_URL_TESTrQ   r?   r*   r   r   rA   rA   $   sJ    G%558ggJ f18*z%#3	
E.r   rA   c                   N    \ rS rSrSr\R                  S-   rSSSS.SS	.rS
 r	Sr
g)GooglePodcastsFeedIE=   zgoogle:podcasts:feedz(?P<id>[^/?&#]+)/?(?:[?#&]|$)z[https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5ucHIub3JnLzM0NDA5ODUzOS9wb2RjYXN0LnhtbArF   zNPR's weekly current events quiz. Have a laugh and test your news knowledge while figuring out what's real and what we've made up.)r/   r2      )r0   rJ   playlist_mincountc                 B   U R                  U5      nU R                  SX"/5      n/ n[        US 5      =(       d    /  H#  nUR                  U R	                  U5      5        M%     [        US 5      =(       d    / nU R                  U[        US 5      [        US 5      S9$ )NncqJEec                     U S   S   $ )Nr   r   r*   r+   s    r   r   4GooglePodcastsFeedIE._real_extract.<locals>.<lambda>N   s    !Qr   c                     U S   $ )Nr$   r*   r+   s    r   r   r_   Q   s    qtr   c                     U S   $ )Nr   r*   r+   s    r   r   r_   S   s    AaDr   c                     U S   $ )Nr   r*   r+   s    r   r   r_   T   s    1r   )playlist_titleplaylist_description)	_match_idr    r   appendr8   playlist_result)r   r0   rO   r   entriesr7   feeds          r   rQ   "GooglePodcastsFeedIE._real_extractI   s    ~~c*""8\>J&78>B>GNN4009: ? t^,2##GD.$A!(~!> $ @ 	@r   r*   NrS   r*   r   r   rX   rX   =   s;    $G%558XXJl2 `
  E@r   rX   )r   commonr   utilsr   r   r   r	   r   rA   rX   r*   r   r   <module>rm      s=     ! 
= 
0.+ .2@/ @r   