
    V|hO                       S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SKrS SK	r
S SKrS SKrS SKrS SKrS SKrS SKrS SKrSSKJrJrJrJrJrJrJrJrJr  SSKJr  SSKJ r J!r!  SSK"J#r#  SS	K$J%r%J&r&  SS
K'J(r(  SSK)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r:J;r;J<r<J=r=J>r>J?r?J@r@JArAJBrBJCrCJDrDJErEJFrFJGrGJHrHJIrIJJrJJKrKJLrLJMrMJNrNJOrO  SSKPJQrQJRrRJSrS  SrTSrUSrVSrWSrXSrYSrZSr[ " S S\5      r\g)    N   )	INNERTUBE_CLIENTS	BadgeTypeGvsPoTokenPolicyPlayerPoTokenPolicyStreamingProtocolYoutubeBaseInfoExtractor_PoTokenContext_split_innertube_clientshort_client_name)initialize_pot_director)PoTokenContextPoTokenRequest   )PhantomJSwrapper   )JSInterpreterLocalNameSpace)	HTTPError)&
NO_DEFAULTExtractorErrorLazyListbug_reports_message
clean_htmldatetime_from_strfilesize_from_tbrfilter_dictfloat_or_noneformat_field	get_firstint_or_nonejoin_nonempty
js_to_jsonmimetype2ext
orderedSetparse_codecsparse_countparse_durationparse_iso8601parse_qs	qualities
remove_endremove_startsmuggle_urlstr_or_none
str_to_intstrftime_or_nonetraverse_objtry_calltry_getunescapeHTMLunified_strdateunsmuggle_urlupdate_url_queryurl_or_noneurljoinvariadic)clean_headersclean_proxiesselect_proxy__yt_dlp_client__yt_dlp_fetch_subs_po_token__yt_dlp_fetch_gvs_po_token__yt_dlp_player_token_provided__yt_dlp_innertube_context__yt_dlp_is_premium_subscriber__yt_dlp_fetched_timestampz4https://github.com/yt-dlp/yt-dlp/wiki/PO-Token-Guidec                   )  ^ \ rS rSrSrSR                  SR                  \R                  5      S9r	SS/r
SrS	r0 S
SSSSSSS._SSSSSSSS._SSSSS._SSSSSSSS._SSS S!SS"S#S._S$SS%S&SS'S#S._S(SS S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GSGSGSSGSSGS.	EGSS0GS	.GS0 SGS_SS_SGS_SS_SS_SGS]/_SGS_S\_SGS_SGS _S\_SGS!_SGS"_S\_SS_SS_SS_GS#SGS$GS%GSGS&GS'\S.EGSS0GS	.GS(0 SGS)_SS_SGS*_SS_SS_SS/_SGS+_S\_SGS,_SGS-_S\_SS_SSK_S\_SS_GS.GS/_SGS_SGS0SGS1GS2GS+GS3GS4\GS.	EGSS0GS	.GS50 SGS6_SS_SGS7_SS_SS_SGSq/_SGS8_S\_SGS9_SGS:_SGS;_SGS<_S\_SS_SS_SS_GSCGS=_SGS>GS?GS8GS@GSA\GSH.EGSBGSCGSD/00SGS.GS	.GSEGSFGSGSGSHGSIGSJ.SGSS0GSK./rGSLrGSMrGSNGSOGSPGSQGSRGSSGSTGSUGSVGSW.	r\R7                  5        V VVs0 s H  u  pX!_M	     snnn rGSXrGSYr\U4GSZ j5       r U4GS[ jr!U4GS\ jr"GS] r#GS^ r$GS_ r%GS`GS`GSa.GSb jr&GS`GSc.GSd jr'GSGSe jr(GSf r)GSg r*GSh r+\GSi 5       r,GSGSj jr-GSk r.GSl r/GSm r0GSn r1GSo r2GSp r3GSq r4GSGSr jr5GSs r6GSt r7GSu r8GSv r9GSGSw jr:GSx r;\U4GSy j5       r<\GSz 5       r=GS{ r>GS| r?GS} r@GSGS~ jrAGSGS jrBGSGS jrC\DGS 5       rEGS rF\DGS 5       rG\GSGS j5       rHGS\GS\I4GS jrJGS\IR                  GS`GS`GS`GS`GS`GS`GS`S4
GS\I4GS jjrLGS rM\DGS 5       rN\DGS 5       rOGS rPGS rQGS rRGS rSGS rTGS rUGSGS jrVGS rWGS rXGS rYGSGS jrZGS r[GS r\GS r]GS r^GSr_U=r`$ s  snnn f (  	YoutubeIEW   YouTubea
  (?x)^
                     (
                         (?:https?://|//)                                    # http(s):// or protocol-independent URL
                         (?:(?:(?:(?:\w+\.)?[yY][oO][uU][tT][uU][bB][eE](?:-nocookie|kids)?\.com|
                            (?:www\.)?deturl\.com/www\.youtube\.com|
                            (?:www\.)?pwnyoutube\.com|
                            (?:www\.)?hooktube\.com|
                            (?:www\.)?yourepeat\.com|
                            tube\.majestyc\.net|
                            {invidious}|
                            youtube\.googleapis\.com)/                        # the various hostnames, with wildcard subdomains
                         (?:.*?\#/)?                                          # handle anchor (#/) redirect urls
                         (?:                                                  # the various things that can precede the ID:
                             (?:(?:v|embed|e|shorts|live)/(?!videoseries|live_stream))  # v/ or embed/ or e/ or shorts/
                             |(?:                                             # or the v= param in all its forms
                                 (?:(?:watch|movie)(?:_popup)?(?:\.php)?/?)?  # preceding watch(_popup|.php) or nothing (like /?v=xxxx)
                                 (?:\?|\#!?)                                  # the params delimiter ? or # or #!
                                 (?:.*?[&;])??                                # any other preceding param (like /?s=tuff&v=xxxx or ?s=tuff&amp;v=V36LpHqtcDY)
                                 v=
                             )
                         ))
                         |(?:
                            youtu\.be|                                        # just youtu.be/xxxx
                            vid\.plus|                                        # or vid.plus/xxxx
                            zwearz\.com/watch|                                # or zwearz.com/watch/xxxx
                            {invidious}
                         )/
                         |(?:www\.)?cleanvideosearch\.com/media/action/yt/watch\?videoId=
                         )
                     )?                                                       # all until now is optional -> you can pass the naked ID
                     (?P<id>[0-9A-Za-z_-]{{11}})                              # here is it! the YouTube video ID
                     (?(1).+)?                                                # if we found the ID, everything can follow
                     (?:\#|$)|)	invidiousa  (?x)
            (?:
                <(?:[0-9A-Za-z-]+?)?iframe[^>]+?src=|
                data-video-url=|
                <embed[^>]+?src=|
                embedSWF\(?:\s*|
                <object[^>]+data=|
                new\s+SWFObject\(
            )
            (["\'])
                (?P<url>(?:https?:)?//(?:www\.)?youtube(?:-nocookie)?\.com/
                (?:embed|v|p)/[0-9A-Za-z_-]{11}.*?)
            \1z(?xs)
            <a\s[^>]*\bhref="(?P<url>https://www\.youtube\.com/watch\?v=[0-9A-Za-z_-]{11})"
            \s[^>]*\bclass="[^"]*\blazy-load-youtubevideo)z2/s/player/(?P<id>[a-zA-Z0-9_-]{8,})/(?:tv-)?playerz/(?P<id>[a-zA-Z0-9_-]{8,})/player(?:_ias\.vflset(?:/[a-zA-Z]{2,3}_[a-zA-Z]{2,3})?|-plasma-ias-(?:phone|tablet)-[a-z]{2}_[A-Z]{2}\.vflset)/base\.js$z%\b(?P<id>vfl[a-zA-Z0-9_-]+)\b.*?\.js$5flvi     mp3@   h263)extwidthheightacodecabrvcodec6i  i  133gpaacmp4v)rS   rV   rX   17         18mp4i  ih  `   h26422i   i     34   35iV  i  36i@  )rS   rT   rV   rX   37i  i8  38i   i   43webmvorbisvp84445465978823Di)rS   rU   format_noterV   rW   rX   
preference83848510010110291HLS0   92939495   96132151H   133z
DASH video)rS   rU   ry   rX   134135136137138)rS   ry   rX   160212264i  298<   )rS   rU   ry   rX   fps299266ip  139m4az
DASH audiom4a_dash)rS   ry   rV   rW   	container140141256)rS   ry   rV   r   258325dtse328zec-3167)rS   rU   rT   ry   r   rX   168169170218219278vp9)rS   rU   ry   r   rX   242243244245246247248271272302303308313315171)rS   rV   ry   rW   172249opus2   )rS   ry   rV   rW   250F   251   _rtmpprotocolrtmp394zav01.0.00M.08395396zav01.0.01M.08397zav01.0.04M.08398zav01.0.05M.08399zav01.0.08M.08400zav01.0.12M.08401)json3srv1srv2srv3ttmlsrtvtt)tv
web_safariweb)r   web_creatorr   Fyoutubez6https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9idBaW_jenozKcrS   titleu#   youtube-dl test video "'/\ä↭𝕐	age_limitr   availabilitypublic
categorieszScience & TechnologychannelzPhilipp Hagemeisterchannel_follower_count
channel_idUCLqxVugv74EIW3VWh2NOa3Qchannel_urlz8https://www.youtube.com/channel/UCLqxVugv74EIW3VWh2NOa3Qcomment_countdescriptionz$md5:8fb536f4877b8a7455c2ec23794dbc22duration
   end_time	   heatmapz	count:100
like_countlive_statusnot_liveTr   zcount:1zre:https?://i\.ytimg\.com/.+i!kP20121002z@PhilippHagemeisterz+https://www.youtube.com/@PhilippHagemeister)
playable_in_embed
start_timetags	thumbnail	timestampupload_dateuploaderuploader_iduploader_url
view_countzVideo unavailable)url	info_dictskipzEmbed-only video (#1746)z%//www.YouTube.com/watch?v=yZIXLfi8CZQyZIXLfi8CZQzCPrincipal Sexually Assaults A Teacher - Episode 117 - 8th June 2012   z$md5:09b78bd971f1e3e289601dfba15ca4f720120608)r   rS   r   r   r   r   zPrivate video)noter   r   r   z!Use the first video ID in the URLz9https://www.youtube.com/watch?v=BaW_jenozKc&v=yZIXLfi8CZQr   )r   r   r   r   r   r   r   r   z.256k DASH audio (format 141) via DASH manifestz+https://www.youtube.com/watch?v=a9LDPn-MO4Iza9LDPn-MO4IzUHDTV TEST 8K VIDEO.mp48KVIDEOzUC8cn-cnCZ2FnxmjfkoLGpsQz8https://www.youtube.com/channel/UC8cn-cnCZ2FnxmjfkoLGpsQ 
media_typezcount:8ijPz@8KVIDEOz https://www.youtube.com/@8KVIDEO)formatskip_downloadyoutube_include_dash_manifestzformat 141 not served anymore)r  r   r   paramsr   z+https://www.youtube.com/watch?v=IB3lcPjvWLAIB3lcPjvWLAzJAfrojack, Spree Wilson - The Spark (Official Music Video) ft. Spree WilsonMusicAfrojackUChuZAo1RKL85gev3Eal9_zgchannel_is_verifiedz8https://www.youtube.com/channel/UChuZAo1RKL85gev3Eal9_zgz$md5:8f5e2b82460520b619ccac1f509d43bf   zcount:19iTWR20131011z@AfrojackVEVOz%https://www.youtube.com/@AfrojackVEVO)
r  r   r   r   r   r   r   r   r   r   z141/bestaudio[ext=m4a])r   r   r  z6Embed allowed age-gated video; works with web_embeddedz'https://youtube.com/watch?v=HtVdAasjOgUHtVdAasjOgUz7The Witcher 3: Wild Hunt - The Sword Of Destiny Trailer
needs_authGamingzThe WitcherUCzybXLxv08IApdjdN0mJhEgz8https://www.youtube.com/channel/UCzybXLxv08IApdjdN0mJhEgz$md5:595a43060c51c2a8cb61dd33c18e5fbd   zcount:17iﱐS20140605z@thewitcherz#https://www.youtube.com/@thewitcherr	  z'Age-restricted; requires authenticationz=Formerly an age-gated video with embed allowed in public sitez'https://youtube.com/watch?v=HsUATh_Nc2UHsUATh_Nc2UzGodzilla 2 (Official Video)EntertainmentFlyingKittyUCYQT13AtrJC0gsM1far_zJgz8https://www.youtube.com/channel/UCYQT13AtrJC0gsM1far_zJgz$md5:bf77e03fcae5529475e500129b05668a   zcount:2it^20200408z@FlyingKitty900z'https://www.youtube.com/@FlyingKitty900)r  r   r   r  z6Age-gated video embedable only with clientScreen=EMBEDz'https://youtube.com/watch?v=Tq92D6wQ1mgTq92D6wQ1mgz#[MMD] Adios - EVERGLOW [+Motion DL]zProjekt MelodyzUC1yoRdFoFJaCY-AGfD9W0wQz8https://www.youtube.com/channel/UC1yoRdFoFJaCY-AGfD9W0wQz$md5:17eccca93a786d51bc67646756894066j   zcount:5it^20191228z@ProjektMelodyz&https://www.youtube.com/@ProjektMelodyz"Non-age-gated non-embeddable videoz'https://youtube.com/watch?v=MeJVWBSsPAYMeJVWBSsPAYz%OOMPH! - Such Mich Find Mich (Lyrics)z
Herr LurikzUCdR3RSDPqub28LjZx0v9-aAz8https://www.youtube.com/channel/UCdR3RSDPqub28LjZx0v9-aAz$md5:205c1049102a4dffa61e4831c1f16851   r   iQ20130730z
@HerrLurikz"https://www.youtube.com/@HerrLurik)r   r   r   r   r   r   r   )r  r   r   zNon-bypassable age-gated videoz'https://youtube.com/watch?v=Cr381pDsSsA)r  r   only_matching__2ABJjxzNozDeadmau5 - Some Chords (HD)deadmau5zUCYEK6xds6eo-3tr4xRdflmQz8https://www.youtube.com/channel/UCYEK6xds6eo-3tr4xRdflmQz$md5:c27e1e9e095a3d9dd99de2f0f377ba06i
  zcount:14i<K20100430z	@deadmau5z!https://www.youtube.com/@deadmau5zDASH manifest missing)r   r   expected_warningsr  lqQg6PlCWgIz5Hockey - Women -  GER-AUS - London 2012 Olympic GamesSportsOlympicsUCTl3QQTvqHFjurroKxexy2Qz8https://www.youtube.com/channel/UCTl3QQTvqHFjurroKxexy2Qz$md5:04bbbf3ccceb6795947572ca36f45904i  was_live
livestream20120731iDPzcount:10iZtU20150827z	@Olympicsz!https://www.youtube.com/@Olympics)
release_daterelease_timestampr   r   r   r   r   r   r   r   z+https://www.youtube.com/watch?v=_b-2C3KPAM0z_b-2C3KPAM0u8   [A-made] 變態妍字幕版 太妍 我就是這樣的人unlistedzPeople & Blogsu	   孫ᄋᄅzUCS-xxCmRaA6BFdmgDPA_BIwz8https://www.youtube.com/channel/UCS-xxCmRaA6BFdmgDPA_BIwz$md5:636f03cf211e7687daffe5bded88a94fU   gqq?zcount:11iyM20110310z
@AllenMeowz"https://www.youtube.com/@AllenMeow)	stretched_ratior   r   r   r   r   r   r   r   qEJwOuvDf7I)r   r%  z+https://www.youtube.com/watch?v=FIl7x6_3R5YFIl7x6_3R5Yuc   [60fps] 150614  마마무 솔라 'Mr. 애매모호' 라이브 직캠 @대학로 게릴라 콘서트dorappi2000UCNlmrKRHLHcd2gq6LtPOTlQz8https://www.youtube.com/channel/UCNlmrKRHLHcd2gq6LtPOTlQz$md5:116377fd2963b81ec4ce64b542173306   zcount:12iU20150626z@dorappi2000z$https://www.youtube.com/@dorappi2000z)https://www.youtube.com/embed/CsmdDsKjzN8CsmdDsKjzN8u1   Retransmisión XVIII Media maratón Zaragoza 2015zAirtek | LED streamingUCzTzUmjXxxacNnL8I3m4LnQz8https://www.youtube.com/channel/UCzTzUmjXxxacNnL8I3m4LnQz$md5:fcac84e6c545114766f670236fc10196i*  20150510i3OUzcount:31iCU20150501z@airtekledstreaming7916z/https://www.youtube.com/@airtekledstreaming7916z+https://www.youtube.com/watch?v=zaPI8MvL8pgz+https://www.youtube.com/watch?v=gVfLd0zydlozhttps://vid.plus/FlRa-iH7PGwz_https://zwearz.com/watch/9lWxNJF-ufM/electra-woman-dyna-girl-official-trailer-grace-helbig.htmlz+https://www.youtube.com/watch?v=lsguqyKfVQglsguqyKfVQgz4{dark walk}; Loki/AC/Dishonored; collab w/Elflover21zFilm & AnimationIronSoulElfUCTSRgz5jylBvFt_S7wnsqLQz8https://www.youtube.com/channel/UCTSRgz5jylBvFt_S7wnsqLQz$md5:8085699c11dc3f597ce0410b0dcbb34a   zcount:13iNV20151119z@IronSoulElfz$https://www.youtube.com/@IronSoulElfz+https://www.youtube.com/watch?v=Ms7iBXnlUO8z+https://www.youtube.com/watch?v=Q39EVAstoRMQ39EVAstoRMz+Clash Of Clans#14 Dicas De Ataque Para CV 4z$md5:ee18a25c350637c8faff806845bddee920151107)r   rS   r   r   r   zThis video does not exist.z+https://www.youtube.com/watch?v=FRhJzUSJbGIz+https://www.youtube.com/watch?v=M4gD1WSo5mAM4gD1WSo5mAz`William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography	Educationz/The Berkman Klein Center for Internet & SocietyUCuLGmD72gJDBwmLw06X58SAz8https://www.youtube.com/channel/UCuLGmD72gJDBwmLw06X58SAchapterszcount:4z$md5:a677553cf0840649b731a3024aeff4cci  licensez4Creative Commons Attribution license (reuse allowed)zcount:3i<pT20150128z@BKCHarvardz#https://www.youtube.com/@BKCHarvard)	r   r   r   r   r   r   r   r   r   z+https://www.youtube.com/watch?v=eQcmzGIKrzgeQcmzGIKrzgz8Democratic Socialism and Foreign Policy | Bernie SanderszNews & PoliticszBernie SandersUCH1dpzjCEiGAt8CXkryhkZgz8https://www.youtube.com/channel/UCH1dpzjCEiGAt8CXkryhkZgz$md5:13a2503d7b5904ef4b223aa101628f39i  iNV20151120z@BernieSandersz&https://www.youtube.com/@BernieSanders)r   r   r  r   r   r   r   r   r   r   r   r   zKhttps://www.youtube.com/watch?feature=player_embedded&amp;amp;v=V36LpHqtcDYz+https://www.youtube.com/watch?v=i1Ko8UG-Tdoz+https://www.youtube.com/watch?v=yYr8q0y5JfguGpuVWrhIzEzPiku - Trailerz$md5:c36bd60c3fd6f1954086c083c72092eb20150811zStandard YouTube License)r   rS   r   r   r   rM  zThis video is not available.z+https://www.youtube.com/watch?v=iqKdEhx-dD4ziqKdEhx-dD4zIsolation - Mind Field (Ep 1)VsaucezUC6nSFpj9HTCZ5t-N3Rm3-HAz8https://www.youtube.com/channel/UC6nSFpj9HTCZ5t-N3Rm3-HAz$md5:f540112edec5d09fc8cc752d3d4ba3cdi%  iקX20170118z@Vsaucezhttps://www.youtube.com/@VsaucezSkipping DASH manifestz+https://www.youtube.com/watch?v=6SJNVb0GnPI6SJNVb0GnPIz Race Differences in Intelligencez$md5:5d161533167390427a1f8ee89a1fc6f1i  20140124)r   rS   r   r   r   r   zJThis video has been removed for violating YouTube's policy on hate speech.1t24XAntNCYzsJL6WA-aGkQz&https://invidio.us/watch?v=BaW_jenozKcz1https://redirect.invidious.io/watch?v=BaW_jenozKcz)https://redirect.invidious.io/Yh0AhrY9GjAz+https://www.youtube.com/watch?v=s7_qI6_mIXcz+https://www.youtube.com/watch?v=Z4Vy8R84T1Uz-https://music.youtube.com/watch?v=MgNrAu2pzNsMgNrAu2pzNszVoyeur Girlalbumz"it's too much love to know my dear	alt_titleartistsStephenzUC-pWHpBjdGG69N9mM2auIAAz8https://www.youtube.com/channel/UC-pWHpBjdGG69N9mM2auIAAcreatorsz$md5:7ae382a65843d6df2685993e90a8628f   20190313i\20190312)r   r   r   r   r  r   r2  r   r   r   trackr   r   r   z/https://www.youtubekids.com/watch?v=3b8nCWDgZ6QDJztXj2GPflDJztXj2GPfkz9Panjabi MC - Mundian To Bach Ke (The Dictator Soundtrack)z$md5:bf577a41da97918e94fa9798d922882520090125z
Panjabi MCz@Beware of the Boys (Mundian to Bach Ke) - Motivo Hi-Lectro Remixz'Beware of the Boys (Mundian To Bach Ke))r   rS   r   r   r   artistrb  rZ  z+https://www.youtube.com/watch?v=x41yOUIvK2kx41yOUIvK2kzIMG 3456zPets & Animalszl'Or Vert asblUCo03ZQPBW5U4UC3regpt1nwz8https://www.youtube.com/channel/UCo03ZQPBW5U4UC3regpt1nw   i?Y20170613z@ElevageOrVertz&https://www.youtube.com/@ElevageOrVertz+https://www.youtube.com/watch?v=CHqg6qOn4noCHqg6qOn4noz+Part 77   Sort a list of simple types in c#	kudvenkatUCCTVrRB5KpIiK6V2GGVsR1Qz8https://www.youtube.com/channel/UCCTVrRB5KpIiK6V2GGVsR1Qz$md5:b8746fa52e10cdbf47997903f13b20dci
  i@"R20130831z@Csharp-video-tutorialsBlogspotz7https://www.youtube.com/@Csharp-video-tutorialsBlogspot)r   r  r   r   r   r   r   r   r   r   r   z+https://www.youtube.com/watch?v=gVfgbahppCYz1https://www.youtube.com/watch_popup?v=63RmMXCd_bQOtqTfy26tG0zBurn Outz	Every DayzThe Cinematic OrchestraUCIzsJBIyo8hhpFm1NK0uLgwz8https://www.youtube.com/channel/UCIzsJBIyo8hhpFm1NK0uLgwz$md5:fee8b19b7ba433cc2957d1c7582067acif  20020513i  inT20141120)r   r   r   r   r  r   r2  release_yearr   r   r   rb  r   r   r   z+https://www.youtube.com/watch?v=nGC3D_FkCmgz+https://www.youtube.com/watch?v=SZJvDhaSDncSZJvDhaSDnczESan Diego teen commits suicide after bullying over embarrassing videozCBS MorningszUC-SJ6nODDmufqBzPBwCvYvQz8https://www.youtube.com/channel/UC-SJ6nODDmufqBzPBwCvYvQz$md5:acde3a73d3f133fc97e837a9f76b53b7   i6oS20140716z@CBSMorningsz$https://www.youtube.com/@CBSMorningscBvYw8_A0vQu:   4K Ueno Okachimachi  Street  Scenes  上野御徒町歩きzTravel & EventszWalk around JapanUC3o_t8PzBmXf5S9b7GLx1Mwz8https://www.youtube.com/channel/UC3o_t8PzBmXf5S9b7GLx1Mwz$md5:ea770e474b7cd6722b4c95b833c03630i  r   i ڷ_20201120z@walkaroundjapan7124z,https://www.youtube.com/@walkaroundjapan7124)r   r   r   r   r   r   WaOKSUlf4TMz-https://music.youtube.com/watch?v=XclachpHxisz+https://www.youtube.com/watch?v=wsQiKKfKxugz+https://www.youtube.com/watch?v=YOelRv7fMxYYOelRv7fMxYzDIGGING A SECRET TUNNEL Part 1
colinfurzezUCp68_FLety0O-n9QU6phsgwz8https://www.youtube.com/channel/UCp68_FLety0O-n9QU6phsgwz$md5:5d5991195d599b56cd0c4148907eec50iT  zcount:6i`20210624z@colinfurzez#https://www.youtube.com/@colinfurzeplayer_clientandroid)extractor_argsr  r	  zAndroid client broken)r   r   r  r   r  player_skipconfigs)r   r%  r  z*https://www.youtube.com/shorts/BGQWPY4IigYStoryboardsz+https://www.youtube.com/watch?v=5KLPxDtMqe85KLPxDtMqe8mhtmlzYour Brain is PlasticSciShowzUCZYTClx2T1of7BRZ86-8fowz8https://www.youtube.com/channel/UCZYTClx2T1of7BRZ86-8fowz$md5:89cd86034bdb5466cd87c6ba206cd2bc   iOx0S20140324z@SciShowz https://www.youtube.com/@SciShow)r  r	  z+https://www.youtube.com/watch?v=2NUZ8W2llS42NUZ8W2llS4u,   The NP that test your phone performance 🙂zLeon NguyenUCRqNBSOHgilHfAczlUmlWHAz8https://www.youtube.com/channel/UCRqNBSOHgilHfAczlUmlWHAz$md5:144494b24d4f9dfacb97c1bbef5de84d   zcount:23iGa20220103z@LeonNguyenz#https://www.youtube.com/@LeonNguyenz+https://www.youtube.com/watch?v=mzZzzBU6lrMmzZzzBU6lrMz$I Met GeorgeNotFound In Real Life...QuackityUC_8NknAFiyhOUaZqHR3lq3Qz8https://www.youtube.com/channel/UC_8NknAFiyhOUaZqHR3lq3Qz$md5:42e72df3d4d5965903a2b9359c3ccd25i  iNazcount:26z	@Quackityz!https://www.youtube.com/@Quackity)r  r   r2  r3  r   r   r   r   r   r   r   r   z+https://www.youtube.com/watch?v=jfKfPfyJRdkjfKfPfyJRdkz	Lofi GirlUCSJ4gkVC6NrvII8umztf0Owz8https://www.youtube.com/channel/UCSJ4gkVC6NrvII8umztf0Owconcurrent_view_countz$md5:48841fcfc1be6131d729fa7b4a7784cbis_live20220712ibbzcount:32i-ebz	@LofiGirlz!https://www.youtube.com/@LofiGirlz+https://www.youtube.com/watch?v=tjjjtzRLHvAtjjjtzRLHvAu*   ハッシュタグ無し };if window.ytcsi
LesmiscoreUCdqltm_7iv1Vs6kp6Syke5Az8https://www.youtube.com/channel/UCdqltm_7iv1Vs6kp6Syke5A   shorti:b20220323z@lesmiscorez#https://www.youtube.com/@lesmiscorez+https://www.youtube.com/watch?v=el3E4MbxRqQel3E4MbxRqQz%dlp test video 2 - primary sv no desczcole-dlp-test-acczUCiu-3thuViMebBjw_5nWYrAz8https://www.youtube.com/channel/UCiu-3thuViMebBjw_5nWYrA   iqc20220908z
@coletdjnzz"https://www.youtube.com/@coletdjnzz+https://www.youtube.com/watch?v=gHKT4uU8ZnggHKT4uU8Zngz$dlp test video title primary (en-GB)z$md5:e8c098ba19888e08554f960ffbf6f90eirb20220729langfr)r  r	  z!Preferring "fr" translated fields)r   r   r  r)  z6 channel audioz+https://www.youtube.com/watch?v=zgdo7-RRjgoz#Multiple HLS formats with same itagz+https://www.youtube.com/watch?v=kX3nB4PpJkokX3nB4PpJkoz$Last To Take Hand Off Jet, Keeps It!MrBeastUCX6OQ3DkcsbYNE6H8uQQuVAz8https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVAz$md5:42731fced13eff2c48c099fbb5c1b3a0i  iP	pc20221112z@MrBeastz https://www.youtube.com/@MrBeastiosz233-1zPO Token Requiredz,Audio formats with Dynamic Range Compressionz+https://www.youtube.com/watch?v=Tq92D6wQ1mgtv_embeddedz251-drcz5Support /live/ URL + media type for post-live contentz(https://www.youtube.com/live/qVv6vCqciTMqVv6vCqciTMu   【 #インターネット女クリスマス 】3Dで歌ってはしゃぐインターネットの女たち【月ノ美兎/名取さな】u   さなちゃんねるUCIdEIHpS0TdkqRkHL5OkLtAz8https://www.youtube.com/channel/UCIdEIHpS0TdkqRkHL5OkLtAz$md5:6aebf95cc4a1d731aebc01ad6cc9806diV  20221223ici`cz@sana_natoriz$https://www.youtube.com/@sana_natori)r   r  r   r2  r3  r   r   r   r   r   r   r   r   z+https://www.youtube.com/watch?v=wSSmNUl9SnwwSSmNUl9Snwz&The Computer Hack That Saved Apollo 14zScott ManleyzUCxzC4EngIsMrPmbm6Nxvb-Az8https://www.youtube.com/channel/UCxzC4EngIsMrPmbm6Nxvb-Az$md5:f4bed7b200404b72a394c2f97b782c02i  i9@Y20170831z@scottmanleyz$https://www.youtube.com/@scottmanleywebpage)r~  r  z*https://www.youtube.com/shorts/18NGQq7p3LY18NGQq7p3LYu8   아이브 이서 장원영 리즈 삐끼삐끼 챌린지u   ㅇㅇUCC25oTm2J7ZVoi5TngOHg9gz8https://www.youtube.com/channel/UCC25oTm2J7ZVoi5TngOHg9gr   if20240822u   @으아-v1ku#   https://www.youtube.com/@으아-v1kzehttp://www.improbable.com/2017/04/03/untrained-modern-youths-and-ancient-masters-in-selfie-portraits/zmsN87y-iEx0z!Feynman: Mirrors FUN TO IMAGINE 6r   20080526z$md5:873c81d308b979f0e23ee7e620b312a3zUCCeo--lls1vna5YJABWAcVAzChristopher Sykesz8https://www.youtube.com/channel/UCCeo--lls1vna5YJABWAcVA   z6https://www.youtube.com/@ChristopherSykesDocumentariesz@ChristopherSykesDocumentariesi :H)	r   r   r   r   r   r   r   r   r  z?https://badzine.de/news/als-marc-zwiebler-taufik-hidayat-schlugbSVcWOq397gzPTAUFIK TUNJUKKAN KELASNYA !!! : Taufik Hidayat VS Marc Zwiebler Canada Open 2011zBadminton Addict IdUCfCpKOwQGUe2FUJzYNadQcQz8https://www.youtube.com/channel/UCfCpKOwQGUe2FUJzYNadQcQz$md5:2c3737da9a575f301a8380b4d60592a8i  zcount:9i`20210519z@badmintonaddictid8958z.https://www.youtube.com/@badmintonaddictid8958zMhttps://lothype.com/2025-chino-hills-hs-snare-quad-features-wgi2025-drumline/lC21AX_pCfAz=2025 Chino Hills HS Snare & Quad Features! #wgi2025 #drumline
DrumlineAVUCqdfUdyiQOZMvW5PcTTYikQz8https://www.youtube.com/channel/UCqdfUdyiQOZMvW5PcTTYikQlocationWESTMINSTERzcount:72ig20250218z@DrumlineAVz#https://www.youtube.com/@DrumlineAVzIhttps://rabota7.ru/%D0%91%D1%83%D1%85%D0%B3%D0%B0%D0%BB%D1%82%D0%B5%D1%80DexR8_tTSsQu3   Работа бухгалтером в Москвеu:   Работа в Москве свежие вакансииUCG3qz_gefGaMiSBvmaxN5WQz8https://www.youtube.com/channel/UCG3qz_gefGaMiSBvmaxN5WQz$md5:b779d3d70af4efda26cf62b76808c0e3*   zcount:7i<1Y20170602u7   @РаботавМосквесвежиевакансииuO   https://www.youtube.com/@РаботавМосквесвежиевакансииgenericimpersonatechromezhttps://www.uca.ac.uk/z
www.uca.aczAUCA | Creative Arts Degrees UK | University for the Creative Artsz$md5:179c7a06ea1ed01b94ff5d56cb18d73bz8/media/uca-2020/hero-headers/2025-prospectus-all-2x2.jpg)r   r   r   r   r   )r   r   playlist_countr  z20348@0004de42mainzplayer_ias.vflset/en_US/base.jsz#player_ias_tcc.vflset/en_US/base.jsz#player_ias_tce.vflset/en_US/base.jszplayer_es5.vflset/en_US/base.jszplayer_es6.vflset/en_US/base.jsz%tv-player-ias.vflset/tv-player-ias.jsz%tv-player-es6.vflset/tv-player-es6.jsz,player-plasma-ias-phone-en_US.vflset/base.jsz-player-plasma-ias-tablet-en_US.vflset/base.js)	r  tcctcees5es6r   tv_es6phonetabletz	nsig funcdlp_winsc                 v   > SSK Jn  U" U5      nUR                  SS /5      S   (       a  g[        TU ]  U5      $ )Nr   )r*   listF)yt_dlp.utilsr*   getsupersuitable)clsr   r*   qs	__class__s       Y/home/james-whalen/.local/lib/python3.13/site-packages/yt_dlp/extractor/youtube/_video.pyr  YoutubeIE.suitable+  s7    )c]66&4&!!$w$$    c                 P   > [         TU ]  " U0 UD6  0 U l        0 U l        S U l        g N)r  __init___code_cache_player_cache_pot_director)selfargskwargsr  s      r  r  YoutubeIE.__init__4  s-    $)&)!r  c                 B   > [         TU ]  5         [        U 5      U l        g r  )r  _real_initializer   r  )r  r  s    r  r  YoutubeIE._real_initialize:  s     "4T:r  c           
        ^ ^^^^^^^^^ [         R                  " 5       m[        R                  " 5       mT Vs/ s H  oR                  S5      (       d  M  UPM     snmUUU UUUUU4S jmUUUUU U4S jn	T Ht  nTUS'   [        R
                  " T R                  TUS   X9T(       + =(       a    UR                  5       5      n
T(       a  XS'   SUS'   M]  [        U
" 0 5      5      US'   US	 Mv     g s  snf )	Nis_from_startc                   > [         R                   " 5       TU-   ::  a  g T
R                  TTTST5      u        p#n[        US[        S9n[        US[        S9nT
R	                  TXeX45      u  p'nmnUS:H  m	[         R                   " 5       mg )Nr   .videoDetailsexpected_type.microformatplayerMicroformatRendererr  )time_initial_extractr2   dict_list_formats)	format_iddelay_prs
player_urlvideo_detailsmicroformatsr   formatsr  r  smuggled_datar   r   video_idwebpage_urls           r  refetch_manifestDYoutubeIE._prepare_live_from_start_formats.<locals>.refetch_manifestC  s    yy{j500*.*?*?]K+B'Aq!QZ(.CSWXM'F"$L -1,>,>xfi,v)AAw!Y.GJr  c                 N  >^  TR                  SS9 H  nT   T" T U5        SSS5        [        U 4S jT 5       S5      nU(       d(  T(       d  T	 S3Ul        OST  [        5        3Ul        M\  UR	                  S5      (       d    gUS   US   T4s  $    g! , (       d  f       N{= f)	zB
@returns (manifest_url, manifest_stream_number, is_live) or None
FfatalNc              3   <   >#    U  H  oS    T:X  d  M  Uv   M     g7f)r  N ).0fr  s     r  	<genexpr>OYoutubeIE._prepare_live_from_start_formats.<locals>.mpd_feed.<locals>.<genexpr>Z  s     LW+)0K!!W   	z: Video is no longer livez*Cannot find refreshed manifest for format manifest_urlmanifest_stream_number)RetryManagernexterrorr   r  )
r  r  retryr  r  r  lockr  r  r  s
   `   r  mpd_feed<YoutubeIE._prepare_live_from_start_formats.<locals>.mpd_feedR  s     ***7$Y6  LWLdS")1
2K&L(RS\R]^q^s]t&u uu^,,  (!,D*EwNN# 8$ # Ts   
B
B$	r  r  	fragmentshttp_dash_segments_generatorr   )		threadingLockr  r  	functoolspartial_live_dash_fragmentscopyr   )r  r  r  live_start_timer   r  r  r  r  r  genr  r  r   s   ``` ````   @@@r   _prepare_live_from_start_formats*YoutubeIE._prepare_live_from_start_formats>  s    ~~YY[
%@g)?1g@	% 	%	 	0 A"AiL##D$=$=x;$37{?WqvvxYC!$+ >*!)#b'!2+o& S As   C2C2c              #   x  ^ ^^^^^^^^^^^#    Su  pxSu  mmmSn	TR                  S5      =(       d    [        R                  " 5       n
X=(       d    U
-
  U:  nU(       a  T R                  [        S5      SS9  SnU	SS snmnSu  mmUUUUUUUUUUU U4S	 jnT R	                  S
U ST 35        T(       Ga^  [        R                  " 5       nTS:  a  g U(       a.   T R                  US SSSS9n[        US 5      mTc	  TS-  mS nMX  OU" STS:  5      u  nmTS-  mU(       d  Mv  UT:  a  S nM  TS-  mU	S:  a  US:  a  TU	-   nU(       a!  [        UT[        UTS   S   -  5      -
  5      n [        UT5       H<  nU" SS5      u  nnU(       d  US-
  n[        S5      e[        TSU 35      nUTS.v   M>     UT:X  a  TS-  mOSmTnT(       a  g [        R                  " [        SX-   [        R                  " 5       -
  5      5        T(       a  GM]  g g ! [         a    S n GN7f = f! [         a     GM  f = f7f)N)r  i )NNTr   startzStarting download from the last 120 hours of the live stream since YouTube does not have data before that. If you think this is wrong,T	only_onceNNc                 l  > TnT	R                  SS 5      nU=(       d/    U=(       a&    [        U[        5      =(       a    UR                  S:H  nT" T
U(       a  SOS5      =(       d    TTS4u  mmmU (       d  U(       a  T(       d  ST4$ UT:X  a  ST4$ T(       a  TnO; TR	                  TS SSSS9u  pgU(       d	  TS-  mST4$ [        U4S	 jU 5       5      nUS
   mUS   mT(       d   e[        [        R                  " STS   S   5      R                  S5      5      nSU4$ ! [
         a    S n Nf = f)N
last_errori  r  iPF  FTr  errnoter  r   c              3   <   >#    U  H  oS    T:X  d  M  Uv   M     g7f)r  Nr  )r  xstream_numbers     r  r  UYoutubeIE._live_dash_fragments.<locals>._extract_sequence_from_mpd.<locals>.<genexpr>  s     `4a5M3NR_3_4r
  r  fragment_base_urlz(?:/|^)sq/(\d+)pathr   )pop
isinstancer   status"_extract_mpd_formats_and_subtitlesr   r  intresearchgroup)refresh_sequence	immediateold_mpd_urlr&  expire_fastfmt_infofmtsr  	_last_seqctxr  r-  r  r  last_seqmanifestless_orig_fmtr  mpd_urlno_fragment_scorer  r+  s            r  _extract_sequence_from_mpdBYoutubeIE._live_dash_fragments.<locals>._extract_sequence_from_mpd  sU    "Kt4J#v
(uz*i7X(u]g]n]nru]uK/7	1Y^/_ 0R3:M52Q ,G]G#w (?* G+>)$0 "EEE5 F OGD %*% (?*`4`` -I ()< =$$$BII&8)B-:OPVVWXYZI?" &  D s   D$ $D32D3[z"] Generating fragments for format    Fr'  c                 2    [        U R                  S   5      $ )NzX-Head-Seqnum)r!   headersr*  s    r  <lambda>0YoutubeIE._live_dash_fragments.<locals>.<lambda>  s    ;qyy?Y3Zr  r      r   r.  r   zbreaking out of outer loopzsq/)r   fragment_countr  )r  r  report_warningr   write_debug_request_webpager   r4   maxr4  ranger:   sleep)r  r  r  r  r  rA  r?  
FETCH_SPANMAX_DURATIONbegin_indexdownload_start_timelack_early_segments	known_idxlast_segment_urlrD  
fetch_timeurlhshould_continueidxr  r-  r  r  r@  rB  rC  r+  s   ` ` ```             @@@@@@@r  r  YoutubeIE._live_dash_fragmentsu  s    #, 
*:'!ggg.=$))+15[H[\_kk 3V!Wbf   h #'9Da6	$&6'1$	$	# 	# 	#@ 	1XJ&HTUJ 2% 00($UEQV 1 XD #4)Z[#%*%'+$ $
 -GtM^acMc,d)!Q&!&8##' MHQ9q=${2	"	8c,)TV-XbJc:c6d+de	 H5C)CE5)Q&OQ*$'!G	,-IJJ'./@Cu+'N$/*2  6 (%*%()%$	 % JJs1j5		CDEu g &  D R " sW   CH:H -A?H:-AH( 	AH:H:H%!H:$H%%H:(
H72H:6H77H:c                     U R                  SS/5      S   =(       d    U R                  nUS:X  a  g[        R                  " SU5      (       d  U R	                  SU S3S	S
9  gUR                  S5      $ )Nplayer_js_versionr  r   actualr$  z[0-9]{5,}@[0-9a-f]{8,}zInvalid player JS version "z?" specified. It should be "actual" or in the format of STS@HASHTr"  @)_configuration_arg_DEFAULT_PLAYER_JS_VERSIONr5  	fullmatchrO  split)r  rb  s     r  _get_player_js_version YoutubeIE._get_player_js_version  s     334G"NqQtUYUtUt(||57HII-.?-@ AE FQU   W  &&s++r  N)	player_idr  c          	      P   U(       d  U(       d   S5       eU(       d  U R                  U5      nSnU R                  5       S   nU(       a  XA:w  a
  SU SU 3nUnU R                  SS/5      S   =(       d    U R                  nU/ U R                  QS	P7;  a;  U R                  S
U SSR                  U R                  5       3SS9  U R                  nU(       d>  U(       a  U R                  USS9  US	:X  a  Sn[        SSU SU R                  U    35      $ U R                  U5      S   nU(       d  US	:X  d  XV:X  a  [        SU5      $ US	:X  a  U(       a  UnOSnU R                  [        UXV:g  =(       a    SU SU 3SU 3SS9SS9  [        SSU SU R                  U    35      $ )Nz>_construct_player_url must take one of player_id or player_urlFr   Forcing player z in place of player player_js_variantr  r   rc  z Invalid player JS variant name "z " requested. Valid choices are: , Tr"  r  https://www.youtube.com
/s/player//z	Forcing "z" player JS variant for player zoriginal url = z	
        delim)_extract_player_infori  re  _DEFAULT_PLAYER_JS_VARIANT_PLAYER_JS_VARIANT_MAPrO  joinrP  r:   _get_player_id_variant_and_pathr"   )r  rk  r  force_player_idplayer_id_overridevariantactual_variants          r  _construct_player_urlYoutubeIE._construct_player_url  s   Jh(hh&11*=I!88:1="4"A /0B/CCWXaWbcO*I))*=tDQGj4KjKjBD77BBB27) <&&*ii0K0K&L%MOZ^   ` 55G  D A(" 4
9+QtOjOjkrOsNt6uvv==jI!LGx$77;T4jAAh( !%iIgY>]^g]h*ij\*	  ,0	 	 	1 0Jyk4KfKfgnKoJp2qrrr  r  c                R    [        USSS[        S9nU(       d  g U R                  US9$ )N).PLAYER_JS_URL).WEB_PLAYER_CONTEXT_CONFIGS.jsUrlF)get_allr  r  )r2   strr~  )r  r  ytcfgsr  s       r  _extract_player_urlYoutubeIE._extract_player_url  s6    !*,].
 ))Z)@@r  c                     U R                  5       S   =n(       a"  U R                  SU 3SS9  U R                  US9$ U R                  SSXS9nU(       a)  U R	                  S	US
US9nU(       a  U R                  US9$ g g )Nr   rm  Tr"  )rk  z"https://www.youtube.com/iframe_apizDownloading iframe API JS)r  r  retry_fatalzplayer\\?/([0-9a-fA-F]{8})\\?/zplayer versionr  )ri  rP  r~  _download_webpage_with_retries_search_regex)r  r  r  r{  iframe_webpageplayer_versions         r  _download_player_urlYoutubeIE._download_player_url$  s    !%!<!<!>q!AAA/A.BCtT--8J-KK<<0, = 2
 !//1>CS[` 0 bN11N1KK  r  c                 p  ^ U R                  U5      n[        [        R                  R	                  U5      R
                  SU S35      mU R                  R                  T5      =(       d.    [        U4S jU R                  R                  5        5       S 5      nU(       d  U R                  SU 3SS9  X#T4$ )Nrq  rr  c              3      >#    U  HK  u  p[         R                  " [         R                  " U5      R                  S S5      T5      (       d  MG  Uv   MM     g7f)en_USz[a-zA-Z0-9_]+N)r5  rg  escapereplace)r  kvplayer_paths      r  r  <YoutubeIE._get_player_id_variant_and_path.<locals>.<genexpr>7  sB      P[E$!||BIIaL00:JK[Y AEs   AA	Az7Unable to determine player JS variant
        player = Tr"  )ru  r-   urllibparseurlparser/  _INVERSE_PLAYER_JS_VARIANT_MAPr  r  itemsrP  r  r  rk  r|  r  s       @r  ry  )YoutubeIE._get_player_id_variant_and_path4  s    --j9	"6<<#8#8#D#I#IZXaWbbcKde5599+F b$ P[==CCEP[\`Kb $$.<1<@  B ;..r  c                     U R                  U5      u  p#nU(       d"  [        R                  " SS[        US5      5      nU SU 3$ )Nz[^a-zA-Z0-9]r  z.js-)ry  r5  subr,   r  s        r  _player_js_cache_keyYoutubeIE._player_js_cache_key@  sD    *.*N*Nz*Z'	Kff_c:k53QRGAgY''r  c                 P    SR                  S UR                  S5       5       5      $ )z.Return a string representation of a signature .c              3   J   #    U  H  n[        [        U5      5      v   M     g 7fr  )r  len)r  parts     r  r  0YoutubeIE._signature_cache_id.<locals>.<genexpr>H  s     J3I4CI3Is   !#)rx  rh  )r  example_sigs     r  _signature_cache_idYoutubeIE._signature_cache_idF  s"    xxJ;3D3DS3IJJJr  c                     U R                    H"  n[        R                  " X!5      nU(       d  M"    O   [        SU< 35      eUR	                  S5      $ )NzCannot identify player r   )_PLAYER_INFO_REr5  r6  r   r7  )r  r  	player_reid_ms       r  ru  YoutubeIE._extract_player_infoJ  sL    ,,I99Y3Dt -
 !#::.!IJJzz$r  c           	          U R                  U5      nX@R                  ;  a.  U R                  X!USU 3SU S3S9nU(       a  XPR                  U'   U R                  R                  U5      $ )NzDownloading player zDownload of z failed)r  r  r(  )r  r  _download_webpager  )r  r  r  r  player_js_keycodes         r  _load_playerYoutubeIE._load_playerT  sx    11*= 0 00))E*=/:&}oW= * ?D 26  /##M22r  c           
      \  ^	 [        U R                  U5      U R                  U5      5      n[        R                  R                  U5      U:X  d   eU R                  SU 35        U R                  R                  SUSS9S sm	nT	(       d  U R                  X5      nU(       a  U R                  XR5      nSR                  [        [        [        [        U5      5      5      5      nU" U5       Vs/ s H  n[!        U5      PM     snm	U R                  R#                  SUT	5        U	4S j$ s  snf )NzExtracting signature function zyoutube-sigfuncs
2025.07.21)min_verr  c                 <   >^  SR                  U 4S jT 5       5      $ )Nr  c              3   .   >#    U  H
  nTU   v   M     g 7fr  r  )r  iss     r  r  JYoutubeIE._extract_signature_function.<locals>.<lambda>.<locals>.<genexpr>p  s      :z!1zs   )rx  )r  
cache_specs   `r  rK  7YoutubeIE._extract_signature_function.<locals>.<lambda>p  s     :z ::r  )r"   r  r  osr/  basenamerP  cacheloadr  _parse_sig_jsrx  mapchrrS  r  ordstore)
r  r  r  r  func_idr  restest_stringcr  s
            @r  _extract_signature_function%YoutubeIE._extract_signature_function_  s   %%j143K3KK3XZww(G3339'CD::??+=wP\?]_c
D$$X:D$$T6C''#c5[1A+B"CDK*-k*:;*:Q#a&*:;JJJ/*E:: <s   .D)c                    ^ U R                  SUSSS9nU R                  X5      u  pE[        U5      nUR                  U[	        XE05      5      mU4S j$ )N)zb\b(?P<var>[a-zA-Z0-9_$]+)&&\((?P=var)=(?P<sig>[a-zA-Z0-9_$]{2,})\(decodeURIComponent\((?P=var)\)\)z(?P<sig>[a-zA-Z0-9_$]+)\s*=\s*function\(\s*(?P<arg>[a-zA-Z0-9_$]+)\s*\)\s*{\s*(?P=arg)\s*=\s*(?P=arg)\.split\(\s*""\s*\)\s*;\s*[^}]+;\s*return\s+(?P=arg)\.join\(\s*""\s*\)z(?:\b|[^a-zA-Z0-9_$])(?P<sig>[a-zA-Z0-9_$]{2,})\s*=\s*function\(\s*a\s*\)\s*{\s*a\s*=\s*a\.split\(\s*""\s*\)(?:;[a-zA-Z0-9_$]{2}\.[a-zA-Z0-9_$]{2}\(a,\d+\))?zX\b[cs]\s*&&\s*[adf]\.set\([^,]+\s*,\s*encodeURIComponent\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\(zg\b[a-zA-Z0-9]+\s*&&\s*[a-zA-Z0-9]+\.set\([^,]+\s*,\s*encodeURIComponent\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\(z;\bm=(?P<sig>[a-zA-Z0-9$]{2,})\(decodeURIComponent\(h\.s\)\)z0("|\')signature\1\s*,\s*(?P<sig>[a-zA-Z0-9$]+)\(z!\.sig\|\|(?P<sig>[a-zA-Z0-9$]+)\(zyt\.akamaized\.net/\)\s*\|\|\s*.*?\s*[cs]\s*&&\s*[adf]\.set\([^,]+\s*,\s*(?:encodeURIComponent\s*\()?\s*(?P<sig>[a-zA-Z0-9$]+)\(z>\b[cs]\s*&&\s*[adf]\.set\([^,]+\s*,\s*(?P<sig>[a-zA-Z0-9$]+)\(zS\bc\s*&&\s*[a-zA-Z0-9]+\.set\([^,]+\s*,\s*\([^)]*\)\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\(z)Initial JS player signature function namesigr7  c                    > T" U /5      $ r  r  )r  initial_functions    r  rK  )YoutubeIE._parse_sig_js.<locals>.<lambda>  s    )1#.r  )r  _interpret_player_js_global_varr   extract_functionr   )r  jscoder  funcnamevarnameglobal_listjsir  s          @r  r  YoutubeIE._parse_sig_jsr  sk     %%e ?u & N   $CCFWF#//+wF\:]^..r  c                    ^ ^^ UUU 4S jnU$ )Nc                  d  > TTR                   ;  a   T" U 0 UD6TR                   T'   TR                   T   n[        U[        5      (       a  UeU$ ! [         a  nUTR                   T'    S nANFS nAf[         a4  n[        [        R                  " 5       US9TR                   T'    S nANS nAff = f)Ncause)r  r   	Exception	traceback
format_excr1  )r  r  eretcache_idfuncr  s       r  inner YoutubeIE._cached.<locals>.inner  s    t111c373H3HD&&x0 $$X.C#y))	J & 534D&&x0  c3A)BVBVBX`a3bD&&x0cs#   A 
B/A..B/;*B**B/r  )r  r  r  r  s   ``` r  _cachedYoutubeIE._cached  s    	 r  c                     SU 3U R                  U5      4nU R                  R                  U5      =n(       a  U$ U R                  R                  " USS06nU(       a  X@R                  U'   U$ )Nyoutube-r  r  )r  r  r  r  r  )r  namer  r  datas        r  _load_player_data_from_cache&YoutubeIE._load_player_data_from_cache  sl    tf%t'@'@'LM%%))(3343Kzz?,?+/x(r  c                     SU 3U R                  U5      4nX@R                  ;  a-  U R                  R                  " / UQUP76   X0R                  U'   g g )Nr  )r  r  r  r  )r  r  r  r  r  s        r  _store_player_data_to_cache%YoutubeIE._store_player_data_to_cache  sW    tf%t'@'@'LM---JJ-h--+/x( .r  c                 |    U R                  U R                  SX0R                  U5      5      nU" X#U5      nU" U5      $ )z3Turn the encrypted s field into a working signaturer  )r  r  r  )r  r  r  r  extract_sigr  s         r  _decrypt_signatureYoutubeIE._decrypt_signature  s?    ll,,eZAYAYZ[A\^83Awr  c           
         Uc  [        S5      e[        SU5      n U R                  X#5      u  pEn U R                  U R                  U R
                  U5      nU" XF5      " U5      n	U R                  SU SU	 35        U R                  SX65        U	$ ! [          a  n[        SUS9eSnAff = f! [        R                   a  n [        U SS9nO! [          a    Uef = fU R                  SU S	U 3U5        U R                  US
S9  Uu  pUR                  SSR                  U
5       SU SU< S3USS9R                  5       n	 SnANSnAff = f)z3Turn the encrypted n field into a working signatureNz&Cannot decrypt nsig without player_urlrp  z$Unable to extract nsig function coder  i  )timeoutzBNative nsig extraction failed: Trying with PhantomJS
         n =  ; player = Tr"  zconsole.log(function(ro  ) { z }(z));zExecuting signature code)r  r  zDecrypted nsig z => nsig)r   r:   _extract_n_function_coder  _extract_n_function_from_code_NSIG_FUNC_CACHE_IDr   r  r   rO  rP  executerx  stripr  )r  r  r  r  r  r  	func_coder  extract_nsigr  r  	func_bodys               r  _decrypt_nsigYoutubeIE._decrypt_nsig  s    !IJJ6
C
	R $ = =h SCI	L<<(J(JDLdLdfpqLs.q1C  	?1#T#78((G
1  	R !GqQQ	R && 	L&tT:!   !s,zl<=EG Q$/'OD++'		$'8i[QEQTU!(B  DDIEG 	LsA   B 5B- 
B*
B%%B*-E
CECA(EEc                    U R                  X5      u  p4[        US [        45      =n(       a  S[        R                  " U5      UR                  U5      4-  n[        R                  " Xa5      =n(       a  S[        R                  " UR                  S5      S S S2   5      -  n[        R                  " XaUR                  5       S S2   5      =n(       a%  UR                  SS5      u  pU=(       d    U	S S S2   $ U R                  [        SU=(       a    S	U 3S
S9SS9  U R                  SUSSSS9u  pU
(       d7  U R                  [        SU=(       a    SU 3S
S9SS9  U R                  SUSSS9$ U(       d  U
$ [        R                  " [        U R                  S[        R                  " U
5       S3USU
 SU S35      5      5      [!        U5         $ )Nc                 $    UR                  S5      $ )Nz-_w8_)endswithr  r  s     r  rK  4YoutubeIE._extract_n_function_name.<locals>.<lambda>  s    

7@Sr  z`(?x)
                \{\s*return\s+%s\[%d\]\s*\+\s*(?P<argname>[a-zA-Z0-9_$]+)\s*\}
            a  (?x)
                    \{\s*\)%s\(\s*
                    (?:
                        (?P<funcname_a>[a-zA-Z0-9_$]+)\s*noitcnuf\s*
                        |noitcnuf\s*=\s*(?P<funcname_b>[a-zA-Z0-9_$]+)(?:\s+rav)?
                    )[;\n]
                argnamer.  
funcname_a
funcname_bz4Initial search was unable to find nsig function name        player = 
rs  Tr"  as  (?x)
            (?:
                \.get\("n"\)\)&&\(b=|
                (?:
                    b=String\.fromCharCode\(110\)|
                    (?P<str_idx>[a-zA-Z0-9_$.]+)&&\(b="nn"\[\+(?P=str_idx)\]
                )
                (?:
                    ,[a-zA-Z0-9_$]+\(a\))?,c=a\.
                    (?:
                        get\(b\)|
                        [a-zA-Z0-9_$]+\[b\]\|\|null
                    )\)&&\(c=|
                \b(?P<var>[a-zA-Z0-9_$]+)=
            )(?P<nfunc>[a-zA-Z0-9_$]+)(?:\[(?P<idx>\d+)\])?\([a-zA-Z]\)
            (?(var),[a-zA-Z0-9_$]+\.set\((?:"n+"|[a-zA-Z0-9_$]+)\,(?P=var)\))zn function name)nfuncr_  r$  r7  defaultz)Falling back to generic n function searchz         player = z(?xs)
                ;\s*(?P<name>[a-zA-Z0-9_$]+)\s*=\s*function\([a-zA-Z0-9_$]+\)
                \s*\{(?:(?!};).)+?return\s*(?P<q>["'])[\w-]+_w8_(?P=q)\s*\+\s*[a-zA-Z0-9_$]+z!Initial JS player n function namer  r  var z\s*=\s*(\[.+?\])\s*[,;]z#Initial JS player n function list (r  ))r  r2   anyr5  r  indexr6  r7  r!  rP  r"   r  rO  jsonloadsr#   r4  )r  r  r  r  r  	debug_strpatternmatchabr  r_  s               r  _extract_n_function_name"YoutubeIE._extract_n_function_name  s   #CCFW$[3SUX2YZZ9Z99W%{'8'8'CDEG 		'22u2 iiI 6tt <=> IIgekkm6GR6G/HII5I ;;|\BDAFDbD>)]F?!2:,?tMX\  ^ **Q  %-=|# + U$ ;@!3J<@!NY]   _ %%` ;6	 & K K
 Ozz*T%7%7BIIh'((?@&1(1SEC&E F GGJ3xQ 	Qr  c                 "   U R                  U R                  SU5      nU" SUSSSS9u  pEnU(       d&  U R                  [        SU=(       a    SU 3S	S
9SS9  g[	        U5      nU R                  UR
                  SU5      nXX" U[        5       SS94$ )z;Returns tuple of: variable name string, variable value listzjs global arraya  (?x)
                (?P<q1>["\'])use\s+strict(?P=q1);\s*
                (?P<code>
                    var\s+(?P<name>[a-zA-Z0-9_$]+)\s*=\s*
                    (?P<value>
                        (?P<q2>["\'])(?:(?!(?P=q2)).|\\.)+(?P=q2)
                        \.split\((?P<q3>["\'])(?:(?!(?P=q3)).)+(?P=q3)\)
                        |\[\s*(?:(?P<q4>["\'])(?:(?!(?P=q4)).|\\.)*(?P=q4)\s*,?\s*)+\]
                    )
                )[;,]
            zglobal variable)r  r  value)NNNr  z+No global array variable found in player JSr  r  rs  Tr"  r$  zjs global listr   )allow_recursion)r  r  rP  r"   r   interpret_expressionr   )	r  r  r  extract_global_varvarcoder  varvaluer  interpret_global_vars	            r  r  )YoutubeIE._interpret_player_js_global_var	  s    !\\$*<*<>OQ[\%7
 *2KUg&i"( ]=?!2:,?tMX\  ^ G$#||C,D,DFVXbc,X~7GY[\\\r  c                 `   U R                  X45      u  pVU(       a'  U(       a   SU S[        R                  " U5       SU 3nOU R                  n/ nSU;   a  UR	                  S5      OSn[
        R                  " S[
        R                  " U5       SU S[
        R                  " US	   5       S
3SU5      nX:X  a%  U R                  [        SU=(       a    SU 3SS9SS9  [        U5      n	U R                  U4n
 U R                  " U R                  /U
Q76 " XU45      " U R                  5        U	R"                  n/ n[        U5      n	U HE  n U	R%                  U5      u  pSU SSR'                  U5       SU SU 3nUR)                  U5        MG     U(       a#  U R                  SSR'                  U5       35        X4$ ! [        R                   a    U R                  R!                  U
S 5         Nf = f! [         a-    U R+                  [        SU S3U=(       a    SU 3SS9SS9   M  f = f)Nr  =z; 	undefinedz\d+z(?x)
                ;\s*if\s*\(\s*typeof\s+[a-zA-Z0-9_$]+\s*===?\s*(?:
                    (["\'])undefined\1|
                    z\[z%\]
                )\s*\)\s*return\s+r   z;
            ;z/No typeof statement found in nsig function coder  r  rs  Tr"  z = function(ro  r  z }; z'Unable to extract global nsig function z from player JSz!Extracted global nsig functions: )r  r  dumps_DUMMY_STRINGr  r5  r  r  rP  r"   r   r  r  r  r  r  r0  _undefined_varnamesextract_function_coderx  appendrO  )r  argnames	nsig_coder  r  r  r  undefined_idx
fixed_coder  r  global_funcnamesdebug_names	func_name	func_argsr	  s                   r  _fixup_n_function_code YoutubeIE._fixup_n_function_code2	  sy   #CCFW{wiqK)@(AI;OI((GK ;F:T))+6Z`VV YYw'(=/ :##%99Xa[#9": ;	
 i!
 "]A?!2:,?tMX\  ^
 J',,j9	3LL22?5=??BzDZ\\`\n\np
 22F#)Ib'*'@'@'K$	#I;l499Y;O:PPUV_U``efpeqr
""9-	 * @;AW@XYZ##' && 	3""8T2	3  b##M=i[XC%6zl#C4%Q\` $ bbs%   :5G  AG6 0G32G363H-,H-c                    U R                  U5      nU R                  SU5      nU=(       d    U R                  X5      n[        U5      nU(       a  XcU4$ U R	                  XRS9nU R
                  " / UR                  U5      QUPUP76 nXcU4$ )Nr  r  )ru  r  r  r   r&  rB  r8  )r  r  r  rk  r	  r  r  r@  s           r  r  "YoutubeIE._extract_n_function_coded	  s    --j9	55fjI	Ed//EF#9,,11&1P	 //j1J1J91UjW]j_ij	y((r  c                 2   ^ UR                   " U6 mU4S jnU$ )Nc                 <  >  T" U /5      nUR	                  S5      (       d  UR                  U 5      (       a  [         R                  " S5      eU$ ! [         R                   a    e [         a-  n[         R                  " [        R                  " 5       US9eS nAff = f)Nr  enhanced_except_z(Signature function returned an exception)r   r  r  r  
startswithr  )r  r  r  r  s      r  r
  =YoutubeIE._extract_n_function_from_code.<locals>.extract_nsigw	  s    OA3i ~~011S\\!__#--.XYYJ !**  O#--i.B.B.DANNOs   	A B.(BB)extract_function_from_code)r  r  r	  r
  r  s       @r  r  'YoutubeIE._extract_n_function_from_codet	  s     --y9
	 r  c           
         U R                  5       S   nU(       a  [        U5      $ [        US[        145      =n(       a  U$ U(       d&  SnU(       a  [	        U5      eU R                  U5        gU R                  SU5      nU(       a  U$ U R                  XUS9=n(       a5  [        U R                  SUSSUS	95      nU(       a  U R                  SX&5        U$ )
zZ
Extract signatureTimestamp (sts)
Required to tell API what sig/player version is in use.
r   STSz5Cannot extract signature timestamp without player urlNstsr  z2(?:signatureTimestamp|sts)\s*:\s*(?P<sts>[0-9]{5})zJS player signature timestamp)r7  r  )
ri  r4  r2   r!   r   rO  r  r  r  r  )	r  r  r  ytcfgr  player_sts_overriderO  	error_msgr  s	            r  _extract_signature_timestamp&YoutubeIE._extract_signature_timestamp	  s    
 #99;A>*++uu{m&<==3=JOI$Y//	*//zBJ$$X$GG4Gd00Et/uE 1 K LC 00
H
r  c           	        ^ SmSR                  U4S j[        S5       5       5      n[        S5       GHP  u  pEU(       a  SOSn[        USUS4[        S	9nU(       d  U R                  S
U S35          g [        R                  R                  U5      n[        R                  R                  UR                  5      n	[        [        U	R                  S5      =(       d    S/S   5      S-
  5      /n
U	R                  S/U/U
SS.5        U(       a  U	R                  SU
S.5        [        R                  R                  UR!                  [        R                  R#                  U	S5      S95      nU R%                  XqSU S3SSS9  GMS     g )Nz@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_r  c              3   ^   >#    U  H"  nT[         R                  " S S5      S-     v   M$     g7f)r   r   ?   N)randomrandint)r  r  CPN_ALPHABETs     r  r  *YoutubeIE._mark_watched.<locals>.<genexpr>	  s&     SAl6>>!S#9B#>?s   *-   )videostatsPlaybackUrlvideostatsWatchtimeUrlzfully playbackTrackingbaseUrlr  zUnable to mark watchedr  z1.5r   r   2
detailpage)vercpncmtel)stetT)queryzMarking zUnable to mark watchedFr  )rx  rS  	enumerater    r9   rO  r  r  r  r*   rj  r  floatr  update
urlunparse_replace	urlencoder  )r  r  player_responsesre  is_fullkeylabelr   
parsed_urlr  video_lengthrZ  s              @r  _mark_watchedYoutubeIE._mark_watched	  sq    ZggSrSS%&YZLG 'HRE,/A3	.R*57C##oeWG$DE..s3J&&z'7'78B  rvve}'?&C Dq HIJLIIuu#"	   		& 
 ,,))##&,,*@*@T*J#KMC ""%8( # 7? [r  c              #     >#    [         R                  " SU5      nU(       a/  U R                  UR                  S5      U 5      v   U R                  e[
        TU ]  X5       S h  vN   [         R                  " SU5       H   nU R                  [        U5      X5      v   M"     [         R                  " SU5       H  nU R                  US   XS   5      v   M     g  Nx7f)NzZ<link rel="alternate" href="(?P<url>https://www\.youtube\.com/watch\?v=[0-9A-Za-z_-]{11})"r   z(class="lazyYT" data-youtube-id="([^"]+)"z(?x)<div[^>]+
                class=(?P<q1>[\'"])[^\'"]*\byvii_single_video_player\b[^\'"]*(?P=q1)[^>]+
                data-video_id=(?P<q2>[\'"])([^\'"]+)(?P=q2)r.  )	r5  r6  
url_resultr7  StopExtractionr  _extract_from_webpagefindallr5   )r  r   r  mobjid_mr  s         r  r|  YoutubeIE._extract_from_webpage	  s     
 yyi ..E!2C88$$$70>>> ::I7SC..c!2C== T  ?@GIA ..2rU33I 	?s   A C#C$A9Cc                 R    U R                  U5      nU(       d  [        SU 35      eU$ )NzInvalid URL: )get_temp_idr   )r  r   r  s      r  
extract_idYoutubeIE.extract_id	  s*    ??3' =!677r  c                 H    [        US[        S9nU R                  US S US9$ )N)playerOverlaysplayerOverlayRendererdecoratedPlayerBarRendererr  	playerBarchapteredPlayerBarRendererrL  r  c                 *    [        [        U S5      SS9$ )N)chapterRenderertimeRangeStartMillis  scale)r   r2   chapters    r  rK  7YoutubeIE._extract_chapters_from_json.<locals>.<lambda>	  s    =W&QRZ^,`r  c                      [        U S[        S9$ )N)r  r   
simpleTextr  )r2   r  r  s    r  rK  r  	  s    <CSV,Xr  )start_functiontitle_functionr   )r2   r  _extract_chapters_helper)r  r  r   chapter_lists       r  _extract_chapters_from_json%YoutubeIE._extract_chapters_from_json	  sE    #  "	# ,,`X -  	r  c           	         ^ ^^^ [        US[        S9nU 4S jmU 4S jm[        [        S UUUU 4S jU 5       5      / 5      $ )N)engagementPanels."engagementPanelSectionListRenderercontentmacroMarkersListRenderercontentsr  c                 :   > [        TR                  U S5      5      $ )NtimeDescription)r(   	_get_textr  r  s    r  rK  CYoutubeIE._extract_chapters_from_engagement_panel.<locals>.<lambda>
  s    ~dnnWN_6`'ar  c                 (   > TR                  U S5      $ )Nr   )r  r  s    r  rK  r  
  s    w(Hr  c              3   `   >#    U  H#  nTR                  [        US 5      TTT5      v   M%     g7f)).macroMarkersListItemRendererN)r  r2   )r  r  chapter_timechapter_titler   r  s     r  r  DYoutubeIE._extract_chapters_from_engagement_panel.<locals>.<genexpr>
  s=      "* ) )),xAf*g*6xQ Q(s   +.)r2   r  r  filter)r  r  r   content_listr  r  s   ` ` @@r  '_extract_chapters_from_engagement_panel1YoutubeIE._extract_chapters_from_engagement_panel	  sM    #~  bHF4 "* )"* + -/0 	0r  c                 p    [        USSSS SSSSS	S
[        SS914S 1S[        14S.4
5      =(       d    S $ )NframeworkUpdatesentityBatchUpdate	mutationsc                 $    US   S   S   S   S:H  $ )NpayloadmacroMarkersListEntitymarkersList
markerTypeMARKER_TYPE_HEATMAPr  r  s     r  rK  ,YoutubeIE._extract_heatmap.<locals>.<lambda>
  s    9&>?N|\`uur  r  r  r  markers.startMillisr  r  c                 B    [        U S   5      [        U S   5      -   S-  $ )Nr  durationMillisr  )r4  rJ  s    r  rK  r  
  s$    Am,<(=AFVDW@X(X\`'`r  intensityScoreNormalized)r   r   r)  )r2   r   )r  r  s     r  _extract_heatmapYoutubeIE._extract_heatmap	
  s]    D 3[u/	3,}4/H.IJ`a4}oFQ#   	r  c                    [        USS[        145      n[        USS[        145      =n(       d  g [        USS[        145      n[        USS[        145      =(       d    SnUU=(       d    SS	.[        USS
S
[        14SS[        14SSU R
                  14SS[        14SS[        14SS[        14SS[        14SSSS[        S5      14S.SS9EUc  S OUR                  S5      S:H  UU R                  U5      S.E$ )Nr  commentEntityPayload
properties	commentId#engagementToolbarStateEntityPayloadpublishedTimer  root)r   parentr  toolbarlikeCountA11yauthor	channelIddisplayNameavatarThumbnailUrl	isCreator
isVerifiedchannelCommandinnertubeCommandbrowseEndpointcanonicalBaseUrlcommandMetadatawebCommandMetadatar   rp  )textr   	author_idr  author_thumbnailauthor_is_uploaderauthor_is_verified
author_urlFr  
heartStateTOOLBAR_HEART_STATE_HEARTED)is_favorited
_time_textr   )r    r  r2   r  r'   ucid_or_noner9   boolr:   r  _parse_time_text)r  entitiesr  comment_entity_payload
comment_idtoolbar_entity_payload	time_texts          r  _extract_commentYoutubeIE._extract_comment
  sY   !*8iAWZ^Y_5`!a*+ALR]`c_dCeff
f!*8iAfimhn5o!p !7,Z]Y^9_`fdf	 &
 1%y)cUC(/K=I&d6G6G5HI#]SE:%-/Ck]$S'/tf&E'/v&F')9;M P56794 
 &<%CT377EIff#..y9%
 	
r  c                    UR                  S5      nU(       d  g UU R                  US5      U R                  US5      [        USSSU R                  145      U R                  US5      [        USS	S
S[
        145      U=(       d    SS.nU R                  US5      =(       d    SnU R                  U5      nUR                  UUS.5        [        S[        US[        SS95      US'   [        US5      nUb  XtS'   [        US[        S9nUb  SU;   US'   U R                  [        US5      /5      n	U R                  U	[        R                  5      (       a  SUS'   [        US5      n
U
(       a  SUS '   U$ )!Nr  contentText	voteCountauthorEndpointr  browseId
authorTextauthorThumbnail
thumbnailsr.  r   r  )r   r  r   r  r  r  r  publishedTimeTextr  )r  r   rp  )r  r  Fr  r  r  authorIsChannelOwnerr  )actionButtonscommentActionButtonsRendererr  creatorHeartr  authorCommentBadgeTr  pinnedCommentBadge	is_pinned)r  r  
_get_countr2   r  r9   r  rm  r:   r  r  _extract_badges
_has_badger   VERIFIED)r  comment_rendererr  r  infor  r   r  comment_abrbadgesr  s              r  _extract_comment_oldYoutubeIE._extract_comment_old0
  s   %))+6
 NN#3]C//*:KH%&69IK[]gjnj{j{i|8}~nn%5|D ,-=@QS_acejmxly?z {&
 NN#35HIOR	)))4	#"
 	 %%|4D Gk!5(23\
 **:<RS));%&"O_ce"#1[#@D %%|4DFZ'[&\]??69#5#566)-D%& !13GH	 $Dr  c              #   0  ^ ^^^^^^^^#    U 4S jmUU U4S jnUUUUU UUU4S jnT(       d  SS SSS[        5       [        5       S.m[        T" S5      5      nU(       a  T R                  R                  S5        US:X  a  T(       a  g S	 T R	                  S
5      S/S-  -    5       tn	mmmn
T R                  U5      nS nSnTS L nU(       a)  U(       d"  T R                  T R                  T5      5      nSnSn[        R                  " S5       GHK  nU(       d    GOBT R                  TT R                  U5      S9nSTS    STS    S3nUS:X  a  U(       a  SnO1STS   U4-  nO&SR                  T(       a  SOST(       a  SOSUU5      nS nU(       d$  TS   S:X  a	  TS   S:X  d  / UQSPU(       a  SOSP/n T R                  S USTUUUS 9nSnS n['        US'S(S)S[(        145      n['        X[*        / S*9 H^  nU(       a  U" U5      nSnU(       a    GM  M!  U" UU5       H  nU(       d        g Uv   M     T R                  S+U05      nU(       d  M\    GMI     GMN     T R-                  US,SS-9nU(       a2  T(       d*  TS   S:X  a   T R%                  S.U 3TSS/9  T R.                  eg g g ! [         a`  nS![        U5      R!                  5       ;   a=  T(       a6  T R#                  S"5      S#;   a  T R%                  S$5         S nA  g [        S%SS&9ee S nAff = f7f)0Nc                 0   > TR                  U S/5      S   $ )Nr  r   )re  )r  r  s    r  rK  ,YoutubeIE._comment_entries.<locals>.<lambda>c
  s    $*A*A!bT*J1*Mr  c                 2  >^ S nU  GH  n[        US5      nT
R                  USS5      nUb  UTS'   T
R                  SU S35        [        T	" S5      S:g  5      m[	        UU4S	 j[
        5      =(       d    0 nUR                  S
5      =(       d    0 nT
R                  U5      =(       d    T
R                  U5      nU(       d  M  [        UR                  S5      5      nU(       d
  TS:X  a  SOSnT
R                  SUR                  5        35          U$    U$ )NcommentsHeaderRenderer	countTextcommentsCount	est_totalzDownloading ~z	 commentscomment_sorttopc                     > U S   S   S   T   $ )NsortMenusortFilterSubMenuRenderersubMenuItemsr  )r*  comment_sort_indexs    r  rK  DYoutubeIE._comment_entries.<locals>.extract_header.<locals>.<lambda>s
  s    a
m,GHXYklr  serviceEndpointr   r   ztop commentsznewest firstzSorting comments by )r2   r  	to_screenr4  r4   r  r  _extract_continuation_ep_data_extract_continuationr/   lower)r  _continuationr  comments_header_rendererexpected_comment_countsort_menu_itemsort_continuation_ep	sort_textr  get_single_config_argr  trackers           @r  extract_header2YoutubeIE._comment_entries.<locals>.extract_headere
  s8    M#+7AY+Z()-,k?*L& *5+AGK(NN]3I2J)#TU%()>~)NRW)W%X"!(,lnr"t "zwy  (6'9'9:K'L'RPR$ $ B BCW X  !G\`\v\v  xF  ]G$'(:(:7(CD	 2D2I~I!5ioo6G5HIJ  1 $0 ! r  c              3     >^#    T(       d  STS'   U  GH&  nT(       d  TS   T:  a  S v   [        US 5      nU(       d'  [        X24SS//[        0 S9nTR                  UT5      nO[	        USS[        145      =(       d    [	        US[        145      n[	        US	[
        145      mT(       d  M  [	        UU4S
 j5      nTR                  UT5      nU(       a  [	        US[
        145      S LUS'   U(       d  M  US   nUR                  S5      (       a  TS   R                  U5        UTS   ;   aE  UTS   ;   a  UR                  S5      (       d  GMA  TR                  ST(       a  SOS S35        S v   OTS   R                  US   5        TS==   S-  ss'   TT(       a  SOS==   S-  ss'   Uv   [        US [        5      n	U	(       d  GM  TS==   S-  ss'   TR                  U	TTUR                  S5      TS9n
[        R                  " U
[        T[        STTS   -
  5      5      5       S h  vN   GM)     g  N
7f)Nr   current_page_threadtotal_parent_commentsc                     U S   $ )NcommentThreadRendererr  rJ  s    r  rK  DYoutubeIE._comment_entries.<locals>.extract_thread.<locals>.<lambda>
  s
    QG^E_r  commentRenderer)commentr2  r  r  commentViewModel)
commentKeytoolbarStateKeyc                    > US   T;   $ )N	entityKeyr  )r  r  comment_keyss     r  rK  r1  
  s    !K.\hJhr  
pinnedTextr  r   pinned_comment_idsseen_comment_idsz?Detected YouTube comments looping. Stopping comment extraction zfor this threadr  z$ as we probably cannot get any more.running_totalr   total_reply_commentsc                     U S   S   $ )NrepliescommentRepliesRendererr  rJ  s    r  rK  r1  
  s    q|D\7]r  )r  r)  )r4   r    r  r  r2   r  r  r  addrO  _comment_entries	itertoolsisliceminrR  )r  entity_payloadsr  comment_thread_rendererr  r3  
view_modelr  r  comment_replies_renderercomment_entries_iterr:  max_parentsmax_repliesmax_replies_per_threadr  r  r)  r  rP  s              @r  extract_thread2YoutubeIE._comment_entries.<locals>.extract_thread
  s    12-.#'*A"Bk"Q*1';_*`' ''00:>OQo=p<q&*B(8$ #778H&QG
 %%<?QSehlgm>no O'2Dtf1MN  $0
=^ad`e<f#gL' +O=hiH"33HfEG/;JX[W\H]/^fj/j,$T]
;;{++0155jA );!<<!W-A%BB7;;WbKcKc !''Y06,B??cef ./33GDMB(A-(&.>UVZ[[V ,3+-]_c,e( ,+12a72+/+@+@0%&{{40' ,A ,C(  )//0Dc.A{WMcEd7d0eGg  h h hw $vhs   GIA#I4H?5Ir   )r>  r  r-  r.  r?  r=  r<  max_comment_depthz|[youtube] max_comment_depth extractor argument is deprecated. Set max replies in the max-comments extractor argument insteadr   c              3   R   #    U  H  n[        U[        R                  S 9v   M     g7f)r  N)r!   sysmaxsize)r  ps     r  r  -YoutubeIE._comment_entries.<locals>.<genexpr>
  s!      Om9kAK3;;/9ks   %'max_commentsr     FT)onResponseReceivedEndpoints.)reloadContinuationItemsCommandappendContinuationItemsActioncontinuationItems)rP  visitor_data(r>  z/~r  r  z$Downloading comment section API JSONz3    Downloading comment API JSON reply thread %d %sr-  z+{}Downloading comment{} API JSON page {} {}z       z replies.r  )r0  r5  r2  r  )item_idrj  eprP  rI  r  check_get_keyszincomplete dataignoreerrors)Tonly_downloadzReceived incomplete data for a comment reply thread and retrying did not help. Ignoring to let other comments be downloaded. Pass --no-ignore-errors to not ignore.zyIncomplete data received for comment reply thread. Pass --ignore-errors to ignore and allow rest of comments to download.expectedr  r  r  r4  r  )r  .messageRendererr  max_runszYoutube said: r  r#  )setr!   _downloaderdeprecated_featurere  r   _build_api_continuation_query_generate_comment_continuationrE  countgenerate_api_headers_extract_visitor_datar  _extract_responser   r  r!  	get_paramrO  r2   r  r  r  CommentsDisabled)r  root_continuation_datarP  r  r  r)  r*  rP  	max_depth_max_commentsr  continuationresponseis_forced_continuationis_first_continuationcontinuation_items_pathpage_numrI  comment_prog_strnote_prefixrc  r  r  continuation_itemsentrymessager(  rM  rN  rO  s   ` ````                    @@@@r  rD  YoutubeIE._comment_entriesa
  s     M	!8?	h ?	hD !"!'()*()$'E&)eG   56I JK	// 1q r>fOm9=9P9PQ_9`dfcgjkck9kOmK{K1G! 112HI!& &$ 
  ==d>a>abj>klL%)"#J!*H//e$JdJdemJn/oG!"7?#;"<Bw{?S>TTUV1}("HK"W 568H[J #JK LRR!'IRv2.0 "N)7;3G13LQXYhQimnQn#N$; #NS #N0E,  LL#N "O11 UG+#1 2 3( &+"L$X0BDWYdfilpkq/rsI&28dhrt&u"(#12D#EL,1)#+,>	JE K K  $99:GY:Z[< 'v] +| ..!79epq.r6go&>!&C.	 :XY]^''' 'D67I "  %A66~~n59PP++st ,e%)+ + s?   F-L9J)BLAL)
L3A
L=LLLLc                 x    SU  SU  S3n[         R                  " UR                  5       5      R                  5       $ )zJ
Generates initial comment section continuation token from given video id
zz2'""z0 x0 Bcomments-section)base64	b64encodeencodedecode)r  tokens     r  rp  (YoutubeIE._generate_comment_continuation,  s:    
 !
*?zImn/6688r  c                    ^ ^^ U UU4S jn[        T R                  SS/5      S   5      n[        R                  " U" U5      SU5      $ )zEntry for comment extractionc           	   3      >#    [        S [        U S0 S9 5       S 5      nTR                  UTT5       S h  vN   g  N7f)Nc              3   T   #    U  H  nUR                  S 5      S:X  d  M  Uv   M      g7f)sectionIdentifiercomment-item-sectionNr  )r  items     r  r  IYoutubeIE._get_comments.<locals>._real_comment_extract.<locals>.<genexpr>7  s-      L!a88/04JJ !as   (	().itemSectionRendererrT  )r  r2   rD  )r  rendererr  r  rP  s     r  _real_comment_extract6YoutubeIE._get_comments.<locals>._real_comment_extract6  sH      L!-h8T^`!aLMQSH ,,XuhGGGs   3><>rY  r  r   )r!   re  rE  rF  )r  rP  r  r  r  r  rY  s   ```    r  _get_commentsYoutubeIE._get_comments4  sE    	H #4#:#:>B4#PQR#ST 5h ?LQQr  c                      SSS.$ )NT)contentCheckOkracyCheckOkr  r  r  r  _get_checkok_paramsYoutubeIE._get_checkok_params?  s    "&t<<r  c                 D    SS0nUb  XS'   SSU00U R                  5       E$ )Nhtml5PreferenceHTML5_PREF_WANTSsignatureTimestampplaybackContextcontentPlaybackContext)r  )r  rO  contexts      r  _generate_player_context"YoutubeIE._generate_player_contextC  sK     1
 ?,/()(' 
 %%'	
 	
r  clientr  c           	         U R                  S/ [        SS9nU GH	  nUR                  S5      u  pVnU(       d  U R                  SU S3SS9  M5  UR                  S5      u  pn	UR	                  5       U:w  a  M_  U(       d.  U R                  S	U S
3SS9  [        R                  R                  n	U	R	                  5       UR                  :w  a  M   [        R                  " [        R                  " [        R                  R                  U5      5      5      R                  5       s  $    g ! [         R"                  [$        4 a    U R                  SU SU	 S3SS9   GMD  f = f)Npo_tokenT)ie_key	casesense+zPInvalid po_token configuration format. Expected "CLIENT.CONTEXT+PO_TOKEN", got ""r"  r  zpo_token configuration for zo client is missing a context; assuming GVS. You can provide a context with the format "CLIENT.CONTEXT+PO_TOKEN"z#Invalid po_token configuration for z	 client: z/ PO Token should be a base64url-encoded string.)re  rG   	partitionrO  r!  rP  r
   GVSr)  r  urlsafe_b64encodeurlsafe_b64decoder  r  unquoter  binasciiError
ValueError)
r  r  r  po_token_strs	token_strpo_token_metasepr  po_token_clientpo_token_contexts
             r  _get_config_po_tokenYoutubeIE._get_config_po_tokenQ  sv   //
By\`/a&I+4+>+>s+C(M##@@I{!MX\ $ ^ 5B5L5LS5Q2O"2$$&&0  1& :Z Z" ! $ $3#6#6#<#< %%'7==8//0H0HI]I]^fIg0hipprr5 '6 NNJ/ ##9&'((WY" $ $ s   AD((1EEr   c                    Sn[        USSS[        R                  R                  145      nS[        US5      ;   a  U R	                  U S3SS	9  SnU(       aH  U[
        R                  :X  a4  U(       d-  U R                  (       d  U(       d  U R                  S
U S3SS	9  gU[
        R                  :X  a  U(       d  U R                  SU S35        gU R                  X5      nU(       au  U(       aH  U[
        R                  :X  a4  U(       d-  U R                  (       a  U(       d  U R                  SU S35        U R	                  U SUR                   SU S35        U$ U(       aA  U[
        R                  :X  a-  U(       d&  U R                  (       a  U R                  S
U S3SS	9  gU R                  " SUUR                  UUUUUUU	U
US.UD6nU(       a&  U R	                  U SUR                   SU S35        U$ g)a&  
Fetch a PO Token for a given client and context. This function will validate required parameters for a given context and client.

EXPERIMENTAL: This method is unstable and may change or be removed without notice.

@param client: The client to fetch the PO Token for.
@param context: The context in which the PO Token is used.
@param ytcfg: The ytcfg for the client.
@param visitor_data: visitor data.
@param data_sync_id: data sync ID.
@param session_index: session index.
@param player_url: player URL.
@param video_id: video ID.
@param webpage: video webpage.
@param required: Whether the PO Token is required (i.e. try to fetch unless policy is "never").
@param kwargs: Additional arguments to pass down. May be more added in the future.
@return: The fetched PO Token. None if it could not be fetched.
Fr  .serializedExperimentFlagstrue).html5_generate_content_po_tokenr.  z7: Detected experiment to bind GVS PO Token to video id.Tr"  z!Unable to fetch GVS PO Token for zz client: Missing required Visitor Data. You may need to pass Visitor Data with --extractor-args "youtube:visitor_data=XXX"Nz$Unable to fetch Player PO Token for z" client: Missing required Video IDzGot a GVS PO Token for z client, but missing Data Sync ID for account. Formats may not work.You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX"z: Retrieved a z PO Token for z client from configz client: Missing required Data Sync ID for account. You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX")r  r  rP  r_  data_sync_idsession_indexr  r  video_webpagerequired_gvs_bind_to_video_idz clientr  )r2   r  r  r*   rP  r
   r  is_authenticatedrO  PLAYERr  r)  _fetch_po_token)r  r  r  rP  r_  r  r  r  r  r  r  r  gvs_bind_to_video_idexperimentsconfig_po_tokenr  s                   r  fetch_po_tokenYoutubeIE.fetch_po_tokenu  s6   2  %"5(#/JV\\MbMbLc+e f\+/[\\*ST`d  f#' 
 7o&9&99 )>)>G[3F8 <e fqu   w o,,,X6vh>`ac33FD w/*=*==$)>)>G[##-fX 6k lm znU[T\\opq"" '_%8%88RVRgRg3F8 <g hsw   y '' 
MM%%'!!"6
 
 znU[T\\cdeO r  c           	         UR                  S5      nU R                  SS/[        S9S   nUS;  a  SnUS:X  d  US:X  a  UR                  S	S
5      (       d  g U R                  S5      R	                  5       nU R
                  R                  R	                  5       n[        U5        [        Xe5        U R                  S US9n[        S%0 S[        U5      _S[        US5      _SU_SU_SUR                  S5      _SUR                  S5      _SUR                  S5      _SU R                  _SUR                  S5      _SUR                  S5      _SUR                  S5      _SU R
                  R                  _SUR                  SS
5      _S[        SU5      =(       d    [        SU 3U5      _SU_SU R                  S5      _S U R                  S!5      (       + _S"U R                  S#5      _S$S
_6nU R                   R#                  U5      $ )&Nr  	fetch_potr  )r  r   )neverautoalwaysr  r  r  Fhttp_headers)default_clientinnertube_context)rP  INNERTUBE_CONTEXTinnertube_hostinternal_client_namer  r  r  r  r_  r  r  request_cookiejarr  request_proxyrp  zhttps://request_headersrequest_timeoutsocket_timeoutrequest_verify_tlsnocheckcertificaterequest_source_addresssource_addressbypass_cacher  )r  re  rG   ru  r  rm  proxiesr<   r=   _select_api_hostnamer   r   r2   r  	cookiejarr>   r  get_po_token)	r  r  r  r  fetch_pot_policyrI  r  r  pot_requests	            r  r  YoutubeIE._fetch_po_token  s=   **Y'  22;Y2WXYZ#>>%' F*

:u55 ..0557""**//1gg'2242O$ 
"7+
*63QR
 *
 "(	

 !**_5
 zz,/
 !**_5
 "22
  N3
  N3
 ZZ
+
 #..88
 #)**-De"L
$ 6@ F(>*: ;WE'
* $+
, !NN+;<-
. $(>>2F#GG/
0 $(>>2B#C1
4 5
: !!..{;;r  c                 n   ^ [        U S5      (       a  g[        U S5      mSn[        U4S jU 5       5      $ )N)playabilityStatusdesktopLegacyAgeGateReasonT)r  )r2  reason)zconfirm your agezage-restrictedinappropriateage_verification_requiredage_check_requiredc              3   @   >#    U  H  nT  H	  o!U;   v   M     M     g 7fr  r  )r  rg  r  reasonss      r  r  )YoutubeIE._is_agegated.<locals>.<genexpr>  s!     ]6F(U\6v%U\%6F   )r2   r  )player_responseAGE_GATE_REASONSr  s     @r  _is_agegatedYoutubeIE._is_agegated  s=    )\]]0[\
 ]6F]]]r  c                      [        U S5      S:H  $ )N)r  r2  
UNPLAYABLEr2   )r  s    r  _is_unplayableYoutubeIE._is_unplayable  s    O-LMQ]]]r  c
                    U R                  UUUU R                  X45      U R                  U5      S   =(       d    U R                  X6U5      U R                  U5      S   =(       d    U R	                  X6U5      S9n
SU0n[        [        [        U5      S   S[        145      nU R                  SU/SS9S   =n(       a  XS	'   U	(       a  S
U	0US'   U(       a  U R                  X%USS9OS nUR                  U R                  U5      5        U R                  USUXJSUSR                  UR                  SS5      R!                  5       5      S9=(       d    S $ )Nr   r   )rP  r  r_  r  delegated_session_iduser_session_idvideoIdPLAYER_PARAMSplayer_paramsTr  r  poTokenserviceIntegrityDimensionsFr  playerzDownloading {} player API JSONr   )ra  rb  rj  rP  rI  r  r  r  )rr  _extract_session_index_parse_data_sync_id_extract_delegated_session_id_extract_user_session_idr2   r   r   r  re  rS  rm  r  rt  r  r  r  )r  r  r  webpage_ytcfgplayer_ytcfgr  
initial_prr_  r  r  rI  yt_query
default_ppr  rO  s                  r  _extract_player_response"YoutubeIE._extract_player_response  s   ++!%55mR((6q9 _55mQ]^ ((6q9 Z00LY , 
  x
 " 7 ? BOVYUZ[]
 33Oj\]a3bcdee=e!.X6?5JH12eod//m[`/auy55c:;%%t!188S9Q9W9W9YZ	 & 
 
 	r  c                    / n/ nU(       a  U R                   O(U R                  (       a  U R                  OU R                  n[	        S [
         5       S SS9nU R                  S5       H  nUS:X  a  UR                  U5        M  US:X  a  UR                  U5        M5  UR                  S5      (       a  UR                  US	S  5        Ma  X;  a  U R                  S
U S35        M}  UR                  U5        M     U(       d  UR                  U5        U H  n	X;   d  M
  UR                  U	5        M     U(       d
  [        SSS9eU R                  (       a  UR                  S5      (       d  U R                  U5      (       a  SU;  a  UR                  S5        U Vs/ s H  n[
        U   S   (       a  M  UPM     n
nU
 H(  nU R                  SU S3SS9  UR                  U5        M*     [        U5      $ s  snf )Nc              3   :   #    U  H  oS S S:w  d  M  Uv   M     g 7f)Nr   r  r  )r  r  s     r  r  3YoutubeIE._get_requested_clients.<locals>.<genexpr>B  s     I"3bqzS7HVV"3s   	c                     [         U    S   $ )Npriority)r   )r  s    r  rK  2YoutubeIE._get_requested_clients.<locals>.<lambda>C  s    08Dr  T)rs  reverser~  r  allr  r   zSkipping unsupported client "r  z%No player clients have been requestedrf  is_music_url	web_musicSUPPORTS_COOKIESzSkipping client "z#" since it does not support cookiesr"  )_DEFAULT_PREMIUM_CLIENTSr  _DEFAULT_AUTHED_CLIENTS_DEFAULT_CLIENTSsortedr   re  extendrI  r9  rO  remover   r  r  r%   )r  r   r  is_premium_subscriberrequested_clientsexcluded_clientsdefault_clientsallowed_clientsr  excluded_clientunsupported_clientss              r  _get_requested_clients YoutubeIE._get_requested_clients9  s   -BD))151F1F--&& 	
 !I"3IDdT --o>F"!((95!((9""3'' ''qr
3.##&CF81$MN!((0 ? !$$_5/O3!((9  0 ! !HSWXX  !!.11T5F5Fs5K5KQ\duQu!((5 &7#%66>OPV>WXj>k%6   # .##&7x?b$cos#t!((0 . +,,#s   G76G7c                 *    [        US5      =o2:w  a  U$ g )N)r  r  r  )r  prr  pr_ids       r  _invalid_player_response"YoutubeIE._invalid_player_responsed  s"     ""&ABBEOL Pr  c                   ^^$ S nU(       a   U R                  U R                  UU S3USS9n/ n/ n	U(       a-  U R                  Xr5      (       d  UR                  0 UESS 0E5        [	        T5      m$TS S S2   mU$U4S jn
SnS =n=p0 nT(       Ga  Sn[        TR                  5       5      u  nnnUU:X  a  UO0 nSU R                  S5      ;  a!  UU:w  a  U R                  UU5      =(       d    UnU=(       d    U R                  UUUS	9nU R                  U5      R                  S
5      nSU R                  S5      ;   a  SnS nU(       d!  U(       d  U(       a  U R                  U5      nSnS nUU:X  a  SU R                  S5      ;  a  UnU=(       d    U R                  XWU5      nU=(       d    U R                  XWU5      nUUUU R                  (       a  UOS U(       a  UOS UU R!                  UU5      U=(       d    U R                  U5      S.nU R                  U5      S   nU(       a  S OBU R"                  " S+S[$        R&                  0UDSUR(                  =(       d    UR*                  0D6n[,        R.                  " U R"                  4S[$        R0                  0UD6n[,        R.                  " U R"                  4S[$        R2                  0UD6n U=(       d     U R5                  UUU=(       d    UUUUUUUS9	nU R                  UU5      =n(       a  UUU'   GOU(       Ga  [;        U=(       d    U R                  U5      S5      n[=        [>        R>                  " 5       5      nURA                  S0 5      n UU [B        '   UU [D        '   [G        U5      U [H        '   UU [J        '   UU [L        '   UU [N        '   [;        U SS[P        145       H9  n!UU![B        '   UU![D        '   UU![N        '   [G        U5      U![H        '   UU![R        '   M;     U(       a  U	R                  U5        OUR                  U5        U RU                  U5      (       a  US:w  a  U
" SU 35        U RU                  U5      (       a0  U R                  (       d  U RW                  U SU RX                   3SS9  US:H  =(       a    U R[                  U5      n"U R                  (       a9  U RU                  U5      (       d  U"(       a  U RW                  U S3SS9  U
" SS5        [;        USS[\        145      n#U#S ;  a  U R_                  U S!U S"U# 35        T(       a  GM  URa                  U	5        U(       ae  U R9                  S#S$Rc                  U5       S%S$Rc                  [	        URe                  5       5      5       S&U S'35        U(       d
  [7        S(SS)9e X4$ U(       d  [7        S*5      eX4$ ! [6         a  nU R9                  U5         S nAGMm  S nAff = f),Nz client initial player responseFr  streamingDatar.  c                     > U  HG  n[        U5      S   nU[        ;   d  M  UT;  d  M%  TR                  U5        TR                  U5          g   g)z>Append the first client name that exists but not already used r   N)r   r   r9  rC  )client_namesclient_nameactual_clientall_clientsclientss      r  append_client:YoutubeIE._extract_player_responses.<locals>.append_client~  sH    + 7 DQ G $55$K7{3#6  ,r  r  r  r  REQUIRE_JS_PLAYERjsTr  webpage_skip)r  r_  r  r  r  r  r  rP  PLAYER_PO_TOKEN_POLICYr  r  )r  r  r  r  r_  r  r  r  r  adaptiveFormats.web_embeddedzweb_embedded.zT: This video is age-restricted; some formats may be missing without authentication. r"  zm: This video is age-restricted and YouTube is requiring account age-verification; some formats may be missingr  r   r  r2  )OKLIVE_STREAM_OFFLINEAGE_CHECK_REQUIREDAGE_VERIFICATION_REQUIRED: z% player response playability status: zSkipping player responses from rr  z* clients (got player responses for video "z" instead of "z")zLAll player responses are invalid. Your IP is likely being blocked by Youtuberf  z%Failed to extract any player responser  )3_search_json_YT_INITIAL_PLAYER_RESPONSE_REr4  r9  rl  r   r0  re  _download_ytcfgr  _get_default_ytcfgr  r  rs  _extract_data_sync_idr  r  r  r
   r  r  recommendedr  r  r  SUBSr  r   rO  r2   r4  r  
setdefaultSTREAMING_DATA_CLIENT_NAME!STREAMING_DATA_FETCH_GVS_PO_TOKENr  $STREAMING_DATA_PLAYER_TOKEN_PROVIDED STREAMING_DATA_INNERTUBE_CONTEXT"STREAMING_DATA_FETCH_SUBS_PO_TOKEN$STREAMING_DATA_IS_PREMIUM_SUBSCRIBERr   STREAMING_DATA_FETCHED_TIMESTAMPr  r  _youtube_login_hintr  r  rP  r&  rx  values)%r  r=  r  r  webpage_clientr  r(  r  r  deprioritized_prsr>  tried_iframe_fallbackr  r_  r  skipped_clientsdeprioritize_prr  base_clientr|  r  require_js_playerr2  fetch_po_token_argsplayer_pot_policyplayer_po_tokenfetch_gvs_po_token_funcfetch_subs_po_token_funcr  r3  r  fetched_timestampsdr  embedding_is_disabledr2  r<  s%    `                                  @r  _extract_player_responses#YoutubeIE._extract_player_responsesj  sM   
**33W!""ABHTY + [J d;;JQQ
 JJ<*<ot<='l$B$-	 !&377
7\#O+B7;;=+Q(FK,2n,D="L 7 7 FF6UcKc#33FHEU#mt'?'?|el'?'mJ $ 7 7 ? C CDW Xt..}==$)!!
&;@Q!66x@
(,%B',=TE\E\]kEl,l'n4+E+Emam+nL'n4+E+Emam+nL ! ,$040E0E4,=j4"!%!<!<]L!Y%H)@)@)H	# 6:5L5LV5TUm5n&(dd.A.A /V'../V2E/V*33T7H7T7T/VO '0&7&7##'Y-<-@-@'YDW'Y# (1'8'8##(Z-<-A-A(ZEX(Z$ .488H"."?-!-))!-!-, 9 . 55b(CCuC*/'$01`AXAXY_A`bu$v!$'		$4!]]?B717-.8O45;?;P787H349Q56;P78%b+I3QUPV*WXA4:A01;RA78>SA:;>B?>SA:;:KA67 Y #%,,R0JJrN   $$N)Bk];<  $$T-B-Bj !//3/G/G.HJUY  [ %,~$=$Y$BUBUVXBY!$$$*;*;B*?*?CXj !L LW[  ]
 m];!"':Hse&LMFmm  H:Rx7\]c\d!efW gZ 	

$%1#((?2K1L M447HHSAWAWAY=Z4[3\\jksjttvxy $bmqs s 
   !HII " ##A&s   )W 
W9W44W9c                 l    US:X  a  U R                  S5      (       d  US:X  a  U=(       d    SS:  a  U$ g g )Nr  live_from_start	post_liver   i   )ru  )r  r   r   s      r  _needs_live_processing YoutubeIE._needs_live_processing  s;    I%$..9J*K*K;.HMX3M 4N.r  c           	          U SU SU SU S[          3	nU/ U R                  QU R                  Q7;   a  U R                  USS9  g U R	                  USS9  g )NrK  z client z formats require a GVS PO Token which was not provided. They will be skipped as they may yield HTTP Error 403. You can manually pass a GVS PO Token for this client with --extractor-args "youtube:po_token=z+.gvs+XXX". For more information, refer to  Tr"  )PO_TOKEN_GUIDE_URLr$  r#  rP  rO  )r  r  r:  protomsgs        r  _report_pot_format_skipped$YoutubeIE._report_pot_format_skipped
  s}    j;-xw 7llwkx y//A.BD 	 QD11QD4P4PQQSD1t4r  c                 <   U=(       d    U SU SU S[          3n[        U R                  S5      U R                  S5      U R                  S5      45      nU(       a  U/ U R                  QU R                  Q7;   a  U R                  USS9  g U R                  USS9  g )	Nz: Some z client subtitles require a PO Token which was not provided. They will be discarded since they are not downloadable as-is. You can manually pass a Subtitles PO Token for this client with --extractor-args "youtube:po_token=z-.subs+XXX" . For more information, refer to  writesubtitleswriteautomaticsublistsubtitlesTr"  )rt  r  ru  r$  r#  rP  rO  )r  r  r:  rv  subs_wanteds        r  _report_pot_subtitles_skipped'YoutubeIE._report_pot_subtitles_skipped  s     Ej} -2 3> ?//A.B	D 	 NN+,NN./NN?+- . k-dt/D/D-dtGcGc-ddSD1t4r  c              #   |  ^ ^^^<^=^>^?^@^A^B^C^D^E#    Sm<Sm=S mC[         R                  " [        5      / smBn0 SS 0smAmE[        / SQ5      mD[	        US5      nT R                  S5      nSU;   m>T R                  S5      (       a  S	m>T R                  R                  S
5        U<4S jn	S n
0 n[        T R                  SS /5      S   SS9nU GH`  nU[           nU[           U-   m?UR                  S5      (       a  M1  [        UR                  S5      5      nUR                  S5      =(       d    0 nUUR                  S5      UR                  S5      4nT>(       d  UU;   a  M  UR                  S5      n[        UR                  S5      5      nUS:X  d  U(       d)  UR                  SS5      R                  5       =(       d    UnUS:X  a  SnU(       a  U(       a  UTAU'   U(       a  UTEU'   UR                  S5      =(       d    SnSUR                  5       ;   nSUR                  5       ;   nUR                  S5      nUR                  SS5      R                  S5      S   nU(       a  U(       d  U(       a	  TC(       d  UmC[        UR                  S 5      5      nUR                  S!5      S":X  a
  U(       d  GM  U(       a8  S#U S$3nUS%:X  a  UT R                   (       a  S&OS' S(3-  nT R#                  UUS	S)9  UR                  S*5      nU(       d  [$        R&                  R)                  UR                  S+5      5      n[+        [-        US, 5      5      n[-        US- 5      n[/        UUUU45      (       dG  S#U S.3nUS/;   a  US0-  nOUS1T R                   (       a  S2OS3 S43-  nUS5-  nT R#                  UUS	S)9  GM   US6R1                  [	        US75      =(       d    S8T R3                  UX#5      5      -  n[)        U5      nUR                  S?5      (       a?   T R;                  T R<                  S@US?   S   5      n [?        US?U " US?   S   X#5      05      n[A        UR                  SD5      =(       d    UR                  SE5      SF5      n![	        USG[A        SFSH9145      m@[C        UU@4SI j5      n"U"(       a  T R#                  SJUS	S)9  U[D           n#T RG                  U5      SK   [H        RJ                     n$USL;  =(       a    U
" U$U[L           U[N           5      n%UR                  U5      =(       d    U#" U%=(       d    U$RP                  SM9n&U&(       a  [?        USNU&05      nX;  a  U&X'   U&(       d1  U%(       a*  SOT R                  S5      ;  a  T RS                  X.SP5        GM  UR                  SQ5      =(       d    URU                  SRS5      =(       d    Sn'[        UR                  SS5      5      =(       d    Sn(0 ST[        UR                  SU5      5      _SV[        UR                  SW5      5      _SXU UR                  S5      (       a  SYOS 3_SZ[W        [W        UU=(       a    S[SS\9U'UR                  S5      =(       a    S][-        US^ 5      [-        US_ 5      U"=(       a    S`U%=(       a    U&(       + =(       a    SaT RY                  Sb5      =(       d    T>=(       a    [[        U5      ScS\9	_SdUSe:X  a  SfOSgShU';   a  SiOS-   _SSU(Sj:  a  U(OS _SkUR                  Sl5      _SU_STD" U5      [        UR                  S5      5      Sm-  -
  _SnU_SoU!_Sp[]        U!T@5      _S*U_Sq[        UR                  Sq5      5      _Sr[W        UU(       a  SsOS5      =(       d    S _StU(       a  T=OU(       a  SuO
U(       a  SvOSg_SwU"(       a  SvO	US:X  a  SxOS _n)[^        R`                  " SyUR                  Sz5      =(       d    S5      n*U*(       aF  [c        U*Re                  Sj5      5      U)S{'   U)Rg                  [i        U*Re                  Sm5      5      5        U(       a6  TBU   Rk                  SPU)R                  Sr5      45        URm                  U5        S|U)R                  S}5      U)R                  S~5      4;   n+U+(       a!  U)R                  S{5      (       a  U)S{   S-   U)S'   TS;  a  T?U)S'   T>(       d  SU;   a.  U)SV   (       a$  0 U)ET>(       a  U)SX    S3OU)SX   SU	" U)5      S.Ev   T>(       d	  SU;  d  GMU  ST<0U)S'   U)v   GMc     T Ro                  TT5      n,SU;  n-[        T R                  S5      5      n.U,S:X  d  U,(       a  U-(       a  U.Rk                  S5        U-(       a  TS:X  a  U,S:w  a  U.Rk                  S5        U=U>U?UAUBUUCUDUEU 4
S jn/0 n0U GH0  n1U1[           nU1[D           n2U1[L           n3U1[N           n4SU.;  =(       a    U1R                  S5      n5U5(       GaE  T RG                  U5      SK   [H        Rp                     n$U
" U$U3U45      n%UR                  UU2" U%=(       d    U$RP                  SM95      n&U&(       a   U5Rs                  S5      SU& 3-   n5X;  a  U&X'   U%(       a/  U&(       d(  SOT R                  S5      ;  a  T RS                  X.S5        OT Ru                  U5USSTS:H  S9u  n6n7[	        U7SS[v        145       H  n8UU8[        '   M     T Ry                  U7U05      n0U6 H;  n9U/" U9SUT R{                  SU9S*   SS S9U%=(       a    U&(       + 5      (       d  M7  U9v   M=     SU.;  =(       a    U1R                  S5      n:U:(       d  GM  T RG                  U5      SK   [H        R|                     n$U
" U$U3U45      n%UR                  UU2" U%=(       d    U$RP                  SM95      n&U&(       a   U:Rs                  S5      SU& 3-   n:X;  a  U&X'   U%(       a1  U&(       d*  SOT R                  S5      ;  a  T RS                  X.S5        GMp  T R                  U:USS9u  n;n7[	        U7SS[v        145       H  n8UU8[        '   M     T Ry                  U7U05      n0U; Hp  n9U/" U9SUU9SX   U%=(       a    U&(       + 5      (       d  M'  [        T R{                  SU9R                  S5      =(       d    U9S*   SS S95      U9SV'   U,(       a  S	U9S'   U9v   Mr     GM3     U0v   g ! [4         aS  nT R#                  S9U S:[7        SS;9 3US	S<9  T R9                  U S=U S>U 35        T R9                  US	S)9   S nAGM  S nAff = f! [4         a\  nU(       a8  T R#                  SAUS?   S    SBU S:[7        SS;9 3US	S<9  T R9                  US	S)9  OT R#                  SCUS	S<9   S nAGM  S nAff = f7f)Ni   r   r   )tinyaudio_quality_ultralowaudio_quality_lowaudio_quality_mediumaudio_quality_highsmallmediumlargehd720hd1080hd1440hd2160hd2880highres).rD  .r  	duplicateinclude_duplicate_formatsTzv[youtube] include_duplicate_formats extractor argument is deprecated. Use formats=duplicate extractor argument insteadc                 N   >^  [        UU 4S j[        ST S   T5       5       5      $ )Nc              3   z   >#    U  H0  nS [        TS    SU S[        UT-   S-
  TS   5       305      0v   M2     g7f)r   rS  r  r   filesizeN)r8   rG  )r  range_start
CHUNK_SIZEr  s     r  r  TYoutubeIE._extract_formats_and_subtitles.<locals>.build_fragments.<locals>.<genexpr>@  s`      F "E+ '%}Ac+
2JQ2NPQR\P].^-_`3  "Es   8;r   r  )r   rS  )r  r  s   `r  build_fragmentsAYoutubeIE._extract_formats_and_subtitles.<locals>.build_fragments?  s0     F "'q!J-!D	F F Fr  c                     U R                   =(       a;    U R                  =(       a    U(       + =(       a    U R                  =(       a    U(       + $ r  )r  not_required_with_player_tokennot_required_for_premium)policyr(  has_player_tokens      r  gvs_pot_requiredBYoutubeIE._extract_formats_and_subtitles.<locals>.gvs_pot_requiredF  s?     T>>SCSTT88R=RSUr  playback_waitr  rT  targetDurationSecitag
audioTrackr   isDrcqualityrU   r  audioQualityr  r^   r  originaldescriptiveaudioIsDefaultr  drmFamiliestypeFORMAT_STREAM_TYPE_OTFzSome zC client https formats have been skipped as they are DRM protected. r   Your accountThe current sessionz may have an experiment that applies DRM to all videos on the tv client. See  https://github.com/yt-dlp/yt-dlp/issues/12563  for more details.r"  r   signatureCipherc                     U S   S   $ )Nr   r   r  rJ  s    r  rK  :YoutubeIE._extract_formats_and_subtitles.<locals>.<lambda>  s    AeHQKr  c                     U S   S   $ )Nr  r   r  rJ  s    r  rK  r    s    afQir  zC client https formats have been skipped as they are missing a url. )r   r   z3YouTube is forcing SABR streaming for this client. zRYouTube may have enabled the SABR-only or Server-Side Ad Placement experiment for zyour accountzthe current session. zDSee  https://github.com/yt-dlp/yt-dlp/issues/12482  for more detailsz&{}={})spr.  	signaturezKSignature extraction failed: Some formats may be missing
         player = z

         )beforerk  z>: Signature extraction failure info:
         encrypted sig = z
         player = nr  zAnsig extraction failed: Some formats may be missing
         n = r  zCCannot decrypt nsig without player_url: Some formats may be missingaverageBitratebitrater  approxDurationMsr  c                     > TT S-  :  $ )Nr   r  )r   format_durations   r  rK  r    s    /HM*Ir  z=Some formats are possibly damaged. They will be deprioritizedGVS_PO_TOKEN_POLICY)rb   r  potmissing_pothttpsqualityLabelaudio_quality_r   asraudioSampleRater  contentLengthr  z-drcry   z
 (default)rs  DRCc                 H    U S   R                  SS5      R                  5       $ )NprojectionTypeRECTANGULARr  r  r!  rJ  s    r  rK  r    s!    1-=+>+F+F}VX+Y+_+_+ar  c                 H    U S   R                  SS5      R                  5       $ )NspatialAudioTypeSPATIAL_AUDIO_TYPE_r  r  rJ  s    r  rK  r    s"    1-?+@+H+HI^`b+c+i+i+kr  DAMAGEDMISSING POTverbosero  source_preferencerf   r.  Premiumd   r   audio_channelsaudioChannelsr   has_drmtbrfilesize_approxrT   languagedesclanguage_preferencer  r   rz   z.((?:[^/]+)/(?:[^;]+))(?:;\s*codecs="([^"]+)")?mimeTyperS   nonerV   rX   _dashr   r  rp  available_atdashyz-dashyhttp_dash_segments)r  r   r  http_chunk_sizedownloader_options
incompleter   r  hlsdashc                   >
^ ^ TT R                  S5      4nT(       d
  UT
U   ;   a  gTS;  a  TT S'   T R                  S5      c  ST S'   US:X  a  TS:X  a  TS	:w  a  T S==   S
-  ss'   U(       a*  [        T R                  S5      SSS9T S'   T S==   S-  ss'   T
U   R                  U5        U(       a  T(       a  U ST 3T S'   O4[        U4S jT
U    5       5      (       a  U ST 3T S'   OU(       a  UT S'   T(       a7  T R                  S5      T:X  a"  [        T R                  S5      SSS9T S'   TT S'   US;   a*  [        T R                  S5      SSS9T S'   T S==   S-  ss'   T" T	R                  [	        T S 5      S5      5      T S'   T S   S:X  a0  T R                  S5      (       a  T" T[        TU 4S jS9   5      T S'   TR                  S5      (       d  T(       a&  [        T R                  S5      [        U5      SS9T S'   T R                  S5      (       a  T S   S
::  a  T S	 TS:X  a(  T R                  S 5      (       a  S!T S '   T S==   S"-  ss'   g#)$Nr  Fr  r  r  r.  r   r  r  r   ry   r  r  rs     r  r  c              3   2   >#    U  H  u  pUT:g  v   M     g 7fr  r  )r  rW  r  ru  s      r  r  \YoutubeIE._extract_formats_and_subtitles.<locals>.process_manifest_format.<locals>.<genexpr>;  s     8KDAQ%ZKs   z	(default)r  )616235r  r  c                 0    U S   R                  S5      S   $ )Nr  r  r   )rh  )r  s    r  rK  [YoutubeIE._extract_formats_and_subtitles.<locals>.process_manifest_format.<locals>.<lambda>H  s    Q{^EYEYZ]E^_`Ear  r  rU   c                 &   > [        U TS   -
  5      $ )NrU   )abs)r*  r  s    r  rK  r  J  s    PSTUXYZbXcTcPdr  )rs  r  ro  r   r  mayber  T)r  r"   rC  r  r4   rG  ru  r   )r  ru  r:  r  r  rs  PREFERRED_LANG_VALUEall_formatsr  itag_qualitiesitagsr   original_languageqres_qualitiesr  s   ``    r  process_manifest_formatIYoutubeIE._extract_formats_and_subtitles.<locals>.process_manifest_format#  s`   !%%
+,C3%+#5 "::$0.!uu()1)+%& l*u~+QZBZ%&!+&#0}1E}\_#`- %&",&$KOOC $(65'!2+8E$K888$(65'!2+!%+ QUU:%6:K%K#0}1E{Z]#^- +?'(~%#0}1EyX[#\- %&#-&^//;a0bdfghAiL|r!aeeHoo s=Fd/e!fg)~~i((K#0EE-(*;K*HPT$V- uuU||%AeH~!%%	"2"2&)%&!+&r  hlsManifestUrlrr  z/pot/rc   F)r  live.z/itag/(\d+)dashManifestUrlr  z/clen/(\d+)r-  z	file sizer  )@collectionsdefaultdictrl  r+   r2   re  rm  rn  r!   rT  rZ  r  r/   r!  rh  r  r  rO  r  r  r*   r9   r4   r  r  r  r   r   rP  r  r  r8   r   r3   rU  rO  r   HTTPSrY  rV  rQ  rw  r  r"   ru  r   r   r5  r#  r$   r7  rm  r&   rC  r9  rq  r   rstrip#_extract_m3u8_formats_and_subtitlesr  _merge_subtitlesr  DASHr3  )Fr  streaming_datar  r  r   r   
stream_idsstreaming_formatsformat_typesr  r  gvs_potsr  fmtr:  r  audio_track	stream_idr  rU   display_nameis_originalis_descriptive
is_defaultlanguage_coder  rv  fmt_urlscencrypted_sigr  rj  decrypt_nsigr  
is_damagedfetch_po_token_func
pot_policyrequire_po_tokenr  r  r   dct	mime_mobjsingle_streamneeds_live_processingskip_bad_formatsskip_manifestsr  	subtitlesrj  fetch_pot_funcr(  r  hls_manifest_urlr=  subsr  r  dash_manifest_urlr  r  r  r  r  r  r  r  r  r  r  sF   `   ``                                                      @@@@@@@@@@r  _extract_formats_and_subtitles(YoutubeIE._extract_formats_and_subtitles*  sT    
! '33C8"z(*QI% 
  )9cd..y9!\1""#>??K// 1c d	F	U  $D$;$;OdV$TUV$Wabc$C89K?@=PLww*++swwv/D'',/52K{t4cggg6FGI
*ggi(G !23F& ''."5;;=H t| +2N4(,3M&)&??=9?RL$(:(:(<<K*l.@.@.BBN$)9:J'OOD"5;;C@CM+*EV$1!377=12G
 wwv"::7k]*mn$&-1-B-B>H]^ _` aC
 ##CT#BggenG\\**3773D+EF%gb2G&HI ',? @B]CDD!+.qrC"&;;TTp151F1F~Labbdf aaC''X'Fx$R4C//xT  G" W%Eyy~~#'<<0B0BFERUJWXM#ZL.w\%*Q-N9 G"  (8 9 OSWWY=OQUVC*31CmZ^F_E`0abO
 ""IJJ##SU]im $ o #&&G"H+/+B+B;+OPe+fgxg~g~+J F" ?$$H I<=?  [) \&0@0ZJDZDZ[  *7UH4EF.,4H) 0]$JaJabkJl5l//wO77>*Ygoo>NPR.SYWYDcggen-2C{377+<#=>K(@A v0@0@fb%IJ }!,
0K|SUV#'''*4uC!abC!kl,9.>.ax<.aTa^^I.=+aCTU`Ca  	 $DDLbbIY]L]Scd%e cAgs4 !#''/":  &!" 1W:SWWW-=(>(BB#$ 7%& s'( "#4S/#J)* w+, SWWW%56-. M->WYZb^b/0 &{';U_PQlzeh  AC14 Zc44<RT5C8 A377:CVC\Z\^I))//!*<=E


<	(:;<d#''**= >?!!),"swwx'8#''(:K&LLM#&u:#7K  "::&2N#w,6C
O@KC$4#5V!<QTU`Qa 4!0!5	  g\9->
,K()	K %N !% ; ;K R'|;T44V<=!Y.).>u%y 8=RV_=_v&1	 1	f 	 B78K ABN$&'K$L!!"FG$N:WrvvFV?W/3/F/F0!!6088I8M8M0O
#3J@UWg#h #<<^M]Mwakawaw5xy'7'>'>s'ChZFX'X$"208-#HdNeNefoNp9p33H5Q!%!I!I((E[\eMe "J "gJD$+D3dV2DE ;F67  F !% 5 5dI FI!21e[$J\J\ .%&$ K] KPQaQrjrfrt t"#G "
 !'n < ZHYAZ  /3/F/F0!!6088I8N8N0P
#3J@UWg#h #<<^M]Mwakawaw5xy(9(@(@(E%PXzHZ(Z%"208-#HdNeNefoNp9p33H6R$($K$KL]_got$K$uMGT+D3dV2DE ;F67  F !% 5 5dI FI$21fk1[>[k[|t|p|}},78J8J .6I0J0VaPUhXcmq 9K 9s -tAjM459/ 2"#G %e !t i & ''--7L 9$$7r$B#CE "*T	 ( ;
 $$#* %44A? C--7L:; $$Q$$7( & !++,,1#JqM?,zl S((;2(F'GI &.	 , ?
 ((d(;++a%- , ? sx   N&v<68s3.!v<>uS	v<H#v<*v<2D&v<Av<3
u=Auv<uv<
v9Av4-v<4v99v<c              #   |  #    [        USSS9R                  S5      S S S2   n[        [        SUR	                  5       =(       d    S 5      5      nU(       d  g [        U5      S-
  n[        U5       GHA  u  pgUR                  S5      n[        [        [        US S	 5      5      n[        U5      S
:w  d  [        U5      (       d2  U R                  SU SSR                  U5       [        5        35        M  Uu  ppnUSS  u  pUR                  S[        XV-
  5      5      R                  SU5      SU 3-   nXU-  -  nUU-  nSU 3SSSSSUU	U
X-  UU[!        ["        R$                  " U5      5       Vs/ s H1  nUR                  S[        U5      5      ['        UUUU-  -
  5      S.PM3     snS.v   GMD     g s  snf 7f)N)storyboardsplayerStoryboardSpecRendererspecr  rT  rJ   r.  zhttps://i.ytimg.com/r   #r     zMalformed storyboard rK  r  z$Lz$Nz&sigh=sb
storyboardr  r  z$M)r   r   )r  ry   rS   r   rV   rX   r   rT   rU   r   rowscolumnsr  )r    rh  r9   r:   r0  r  rk  r  r  r!   r  rO  rx  r   r  r  rS  mathceilrG  )r  rq  r   r.  base_urlLr  r  countsrT   rU   frame_countcolsr3  Nsighr   rN  fragment_durationjs                       r  _extract_storyboardYoutubeIE._extract_storyboard  s    U_acchchilcmnrprnrtw'=txxz?QTRSIM GA::c?D#k4845F4yA~S[[##&;A3b$@PQdQfPg$hi5;2E;d12hGA""4QU4<<T1E&QUPVWC(4K8N (> 9!!X+#   "- !>!:;= <a ;;tSV4 #$5x1GXCX7Y Z <=  '2=s   E0F<28F7*F<c                 4   S nU(       a  SU R                  S5      ;  ay  SSS.nU R                  SS /SS9S	   =(       d    [        [        US
[        145      nU(       a  XeS'   U R	                  XU[        U R                  U5      SSSS[        1405      S9nU$ )Nr  r  
99999999991)bpctrhas_verifiedr  Tr  r   r  ppz
User-Agentr  r  	userAgent)rj  rI  )re  r2   r   r  r  rO  )r  r  r]  r  r  rj  rG  s          r  _download_initial_webpage#YoutubeIE._download_initial_webpage  s    9D,C,CM,RR*C@E''$4'PQRS ] 1NOVYUZ3[\   d99U$T%<%<^%L #6+PSu"UO  : G
 r  c                    [        US5      n[        US5      nUc  [        US5      n[        US5      n	[        US5      n
[        US5      nU(       a  SO%U(       a  SOU
(       a  S	OU	(       a  S
O
SX4;   a  SOS n[        US5      nU R                  XX\U5      Gt p[        S U 5       5      (       a  U H  nSUS'   M
     X|XU4$ )N).liveBroadcastDetailsisLive	isLiveNowisLiveContent
isUpcomingisPostLiveDvrrp  r  is_upcomingr.  Fr   ).r7  c              3   B   #    U  H  oR                  S 5      v   M     g7f)r  Nr  )r  r  s     r  r  *YoutubeIE._list_formats.<locals>.<genexpr>  s     1AuuYs   Tr  )r2   r    r)  r  )r  r  r  r  rq  r  r   live_broadcast_detailsr  live_contentrR  rp  r   r	  r  r$  r  s                    r  r  YoutubeIE._list_formats  s    !-l<Y!ZM84? 6DG @|<m_=	&/{)0I-8M*6J*/G3J*JJ  	 &&68NO"AA.\fu}~1111#)  &NYVVr  c                 R   S nU(       aI  SU R                  S5      ;  a4  U R                  XSS9n[        US5      (       d  U R                  S5        S nU(       dM  SU R                  S5      ;  a8  SU0nUR	                  U R                  5       5        U R                  US	SXFSS
US9nU$ )Ninitial_datarB  Fr  r  zIIncomplete data received in embedded initial data; re-fetching using API.r  r  r  z!Downloading initial data API JSON)ra  rb  r  rP  rj  rc  r  r  )re  extract_yt_initial_datar2   rO  rm  r  rt  )r  r  r  r]  r  rY  rj  s          r  _download_initial_data YoutubeIE._download_initial_data  s    ~T-D-D^-TT77QV7WLj99##$op#d6M6Mm6\ \)ELL113411 V5#8 2 YL r  c                     U R                   (       a  U(       d  g[        US5      n[        US5      S:H  =(       d,    SU R                  US5      =(       d    SR                  5       ;   $ )NF)topbardesktopTopbarRendererlogotopbarLogoRenderer)	iconImageiconTypeYOUTUBE_PREMIUM_LOGOpremiumtooltipTextr  )r  r2   r  r!  )r  rY  tlrs      r  _is_premium_subscriber YoutubeIE._is_premium_subscriber  s`    $$L[] 78<RR OT^^C?E2LLNN	
r  c                 D   U R                  X4U5      nU R                  XV5      =(       d    U R                  U5      nU R                  XVXG5      nU R	                  U5      n	U	(       a  U R                  S5        U R                  U R                  XU	5      XVXGU	5      u  pXgXX4$ )Nz%Detected YouTube Premium subscription)rI  extract_ytcfgrO  r[  rh  rP  rl  r/  )r  r   r  r  r]  r  r  r  rY  r(  rq  r  s               r  r  YoutubeIE._initial_extract  s    00hW**8=hAXAXYgAh228nd $ ; ;L I DE'+'E'E''<QR~>S(U$ |L\hhr  c                 t1  ^ ^^^^^^^^ [        U0 5      u  pT R                  U5      mT R                  5       S-   nUS-   T-   nSnT R                  XXET5      u  mpgpn
[	        U	S[
        S9n[        US[        S9nU(       a!  T R                  UT R                  5       U5      $ T(       a  U U4S jOS n[	        U	S	[
        S9n[	        U	S
[
        S9n[	        USSSSS[
        1[        45      n[	        USSSSS[        1[        45      n[	        USSS[
        1[        45      =(       d    0 n[	        USSSS[
        145      =(       d    0 nT R                  US5      =(       d    T R                  US5      nT R                  US5      nT R                  =(       a    U=(       d&    [        US5      =(       d    U=(       d
    U" / SQ5      nU(       d  U(       a  T R                  S5        UnT R                  US5      n[        US5      nUb  T R                  =(       a    U=(       d    UOUnUc  Un[        U	S[        S9nU(       GaZ  UR                  S5      (       GdC  T R                  S 5      (       a  T R!                  S!T S"35        GO/ n/ nUR#                  S#5       H  n[$        R&                  R)                  [$        R&                  R+                  U5      5      mU4S$ jnU" S%5      nU(       d  MV  U" S5      n Un!U (       a	  U!S&U  S'3-  n!UR-                  S(S)[/        S*R1                  UTS%   S+   5      SS,05      U!S-.5        UR-                  U5        M     T R!                  S.R1                  S/R3                  U5      T5      5        T R5                  UTUU5      $ [7        [        US05      5      =(       d6    [7        [        US05      5      =(       d    [9        U" S15      5      =(       d    S n"T R;                  TXXU"5      u  n#mn$n%n&TS2:X  a  T R=                  T S335        U%(       Gd  T R                  S45      (       d"  [	        U$S55      (       a  T R?                  T5        [        US6[
        S9=(       d    0 n'T R                  U'S75      =(       d    [        US75      n([A        T R                  U'S85      =(       d    S95      n)U)(       ad  U)RC                  S:5      (       aF  [        US;5      n*U*(       d"  U" S<5      n+U+(       a  U+R#                  S#5      OS n*T RE                  U)U*S,S=9  U(S>U) 3-  n(U((       a  S?U(RG                  5       ;   a6  [I        U(S@5      n([I        U(RK                  5       SA5       S>T RL                   3n(OX[        USBSC[
        145      (       a  U(SD-  n(O9SEU(;   a3  [I        U(RK                  5       SA5       S>T RN                  (       a  SFOSG SH3n(T RQ                  U(S,SI9  [        USJ[R        S9=(       d    / n,U,(       dU  T(       aN  [T        RV                  " T RY                  SK5      T5       V-s/ s H  n-[[        U-R]                  S5      5      PM     n,n-U, H  n.U.RC                  SL5      (       d  M  [T        R^                  " SMU.5      n/U/(       d  M;  SN U/Ra                  5        5       u  n0n1U0S+:  d  M]  U1S+:  d  Me  U0U1-  n2U% H  n3U3R                  SO5      SP:w  d  M  U2U3SQ'   M!       O   T Rc                  X4SR5      n4U" SSST/5      n5U5(       a  U4R-                  SUU505        U4Re                  5       n6/ SVQn7[g        U75      n8U4Ri                  UU4SW jU7 5       5        U4 H9  m[k        UU4SX j[m        U75       5       U85      n9SYTSU   ;   a  S+OSZS[U9-  -
  TS\'   M;     T Ro                  U45        T Rp                  Rs                  U65        [        US]5      =(       d    U" S^5      n:T Ru                  [w        [        US_5      =(       d    [        US`5      =(       d    U" S_5      5      5      n;[        USa5      n<[y        [        U#Sb5      5      n=[y        [        U#Sc5      5      n>U"(       d  U>(       a  U=(       a  U>U=-
  n"T R{                  TU"5      mUU4Sd jn?[}        U?U%5       H@  n@U@R                  S\5      =(       d    SZSe-
  W@S\'   [        U@R                  Sf5      SgShSi9U@Sf'   MB     T(       a  T R                  U%TU=XUTSj:H  5        U%Ri                  T R                  U	U"5      5        T R                  U<5      nA0 S%T_SU_SkU%_SlU4_Sm[	        U6Sn5      _SoU_SpU;_Sq[        U;S SrS Ss9_S1U"_St[7        [        X4Su5      =(       d    U" Sv5      5      _Sw[        [        USx5      5      _Sy[        USz5      S{L d  U" S|5      S}:X  d  U" S~5      S:X  a  SOS+_SU_SU:(       a  U:/OS _SU,_S[        US5      _ST_[        US5      (       a  SO[        US5      (       a  SOSU=SSSSSST R                  S/ 5      ;   a  SOSOSSSS4
S.EnBS nCU 4S jnD0 nE[        5       nF[	        U	SSSSS 45       VGs0 s H  nGUGS   T R                  UGS   SS9_M     nHnGST R                  S5      ;  =(       a*    T R                  SS{5      =(       d    T R                  S5      nI[	        U	S 5      nJ[	        UJSSSSS[
        145      nKUK VLs1 s H"  nLULR                  S5      S:w  d  M  WC" WL5      iM$     nMnLWK VLs1 s H,  nLULR                  S5      S:X  d  M  [        WC" WL5      S5      iM.     nNnLWJ GH  nOUOS   S   nPUOS   [           nQUOS   [           S   S   nRT R                  UQ5      S   nSUOS   [           nT0 nUS{nV[	        UPSS 45       GH  nWUWS   n[)        U5      mWC" UW5      nX[        U4S jS 5       5      =(       d-    WSR                  =(       a    WSR                  =(       a    U(       + nYWV(       d7  S,nVWT" WY=(       d    WSR                  S9=nZ(       a  WUR                  WZSWRS.5        WU(       d-  WY(       a&  WFR                  WQ5        T R                  TUQ5          GODTR                  SS /5      SZ   n[T R                  WWSSS9n\UWR                  S5      S:w  a0  WX(       d  GM  WD" WEUWXW\WQWU5        WWR                  S5      (       d  GMC  WHR                  5        H  u  n]n^U](       d  M  W]n_WWR                  S5      S:w  a'  W]S:w  a!  WI(       d  M5  W]SWX 3-  n]W^[        W\S S5      -  n^WXSW_ 3:X  aP  U% H7  n3U3R                  S5      SP:w  d  M  U3R                  S5      (       a  M2  W_U3S'   M9     WD" U&UW] S3W^ S3WQWU5        WD" U&UW]W^WQW[W_:X  a  WUOSW]0WUE5        M     GM     WMR                  WE5        WNR                  U&5        UM(       a  GM  WN(       a  GM    O   WF(       a^  WM(       d  WN(       aP  T R                  TS,[        T S3WM=(       a    SS/R3                  WM5       SA3WN=(       a    S[g        WN5       S3ShSi9S9  U&WBS'   WEUBS'   [$        R&                  R                  U5      n`U`R                  U`R                  4 Hn  na[$        R&                  R)                  Ua5      nbUbR                  5        H8  u  ncndS H,  u  nenfUeS-  neUeWB;  d  M  WcWf;   d  M  [9        WdS+   5      WBWe'   M.     M:     Mp     U=(       d    S9RK                  5       R                  S5      (       Ga  [T        R^                  " SU5      n/U/(       a  U/R]                  S5      ngU/R]                  S5      nhUh(       a  WhR                  SS95      nhWg(       d  WhS S ngWBR                  U/R]                  SRK                  5       5      U/R]                  S5      =ni(       a  Wi/O>U/R]                  S5      R#                  S5       Vis/ s H  niUiRK                  5       PM     sniU/R]                  S5      RK                  5       Wh[7        Wg5      S.5        Sm[	        USSU4S jSSSS4T R                  S{S9WBS'    US   S   S   S   S   S+   S   S     ST S3TSTS;   a  SOSS./WBR                  S0 5      S'   U(       ad  T R                  UU"5      =(       d4    T R                  UU"5      =(       d    T R                  UU"5      =(       d    S WBS'   T R                  U5      UBS'   [	        US[R        / S9nj[        UjS5      nkUk(       Ga  WkR                  S5      nlUl(       a  T R                  Wl5      nl[        WkS 5      S:X  a  WlWBS'   Or[T        R^                  " SWl5      n/U/(       aT  WBR                  U/R]                  S5      [        U/R]                  S[5      5      [        U/R]                  S5      5      S.5        [        WkS [R        5      =(       d    /  H  nm[        [	        UmSS5      5      nnUn H  noS S4S S /S44 H  u  npnq[        WoUp[
        5      =(       d    0 R                  S5      nrUr(       d  M8  [T        R                  " WqWr5      n/U/(       d  MX  [        U/R]                  GS 5      5      WBU/R]                  GS5      GS-   '     M     M     M     [	        WkGSGSGSSGSGSGSGSGSGS	GS
GS[        14S{GS9WBGS'   [	        UkGS5      nsUs(       aH  T R                  WsGS5      ntUsR                  GS5      (       a  WtWBGS'   OWBR                  St5      c  WtWBSt'   [        WjGS5      nuUu(       Ga  [	        WuGS5      nvWBR                  T R                  UvS5      T R                  UvGS5      GS.5        WA(       d%  T R                  [	        WvGSGS[        14S{GS95      nA[        WuGS [R        5      =(       d    / nwS{nxUw H  ny[        UyGS 5      S,L d  M  S,nx  O   Ww H  nyUyR                  GS5      =(       d    0 nzUzR                  S5      n{U{(       d  M8  T R                  WzS5      n{T R                  UzGS5      n|U{GS:X  a  W|WBGS'   Ml  Wx(       a  Mu  W{GS:X  a  W|WBS'   M  W{GS:X  a  W|(       a  W|/OS WBGS '   M  W{GS!:X  d  M  W|WBS'   M     T R                  [	        WuGS"5      5      n}T R                  U}[        R                  5      (       a  S,WBGS#'   WBR                  UBR                  GS$5      WA[        UAS GS%S Ss9GS&.5        [y        [        UGS'5      [        GS(9=(       d    [y        U" GS'5      [        GS(9n~U~(       aH  [        R                  R                  W~[        R                  R                  5      R                  GS)5      O.[        [        UGS'5      5      =(       d    [        U" GS'5      5      nU(       a  W~(       d;  TGS*;   a4  [        T R                  T R                  WkGS+5      5      5      =(       d    WnWWBGS,'   W~UBGS-'   U(       as  TGS.;  al  [        W5      R                  [        R                  R                  GS/9nU[        GS05      :  a+  WBSk    H"  n@U@R                  GS15      GS2:X  d  M  S,W@GS3'   M$     GS4 H%  u  nneWBR                  U5      ndUd(       d  M   WdWBWe'   M'     T R                  [	        WkGS55      5      nT R                  U[        R                  5      =(       d    [        UGS6[        S9nT R                  W[        R                  5      (       a  GS7OT R                  WU(       a,  Wb)  T R                  W[        R                  5      =(       d    S{OS U(       a,  Wb)  T R                  W[        R                  5      =(       d    S{OS WBSy   S:  Wc  S O6T R                  W[        R                  5      =(       d    [        UGS8[        S9GS99WBGS:'   T R                  UTWjT5      UBGS;'   T R                  TU	5        UB$ s  sn-f s  snGf s  snLf s  snLf s  snif ! [        [        [        4 a     GNf = f(<  Nz//www.youtube.com/zwatch?v=r   ).r  r  )errorScreen%playerLegacyDesktopYpcTrailerRenderertrailerVideoIdc                 &   > TR                  U TS S9$ )NrT  )_html_search_meta)r*  r  r  s    r  rK  )YoutubeIE._real_extract.<locals>.<lambda>#  s    $"8"8GT"8"Rr  c                     g r  r  rJ  s    r  rK  rs  $  s    $r  r  r  r  .r  r  $structuredDescriptionContentRendererr  &expandableVideoDescriptionBodyRendererattributedDescriptionBodyTextvideoDescriptionHeaderRendererr  r  r  !playerOverlayVideoDetailsRendererr   ).r   )zog:titleztwitter:titler   zoNo title found in player responses; falling back to title from initial data. Other metadata may also be missing).r   shortDescription)multicameraplayerLegacyMulticameraRenderermetadataListforce_singlefeed
noplaylistzDownloading just video z because of --no-playlist,c                 0   >^  [        TU 4S j[        5      $ )Nc                    > U T   S   $ )Nr   r  )r*  r  s    r  rK  =YoutubeIE._real_extract.<locals>.feed_entry.<locals>.<lambda>c  s    4r  )r4   r  )r  	feed_datas   `r  
feed_entry+YoutubeIE._real_extract.<locals>.feed_entrya  s    &%';S B Br  r   z (r  url_transparentYoutubez{}watch?v={}r   T)_typer  r   r   zNDownloading multifeed video ({}) - add --no-playlist to just download video {}ro  lengthSecondsr   rp  z): Video is in Post-Live Manifestless modeallow_unplayable_formats).licenseInfos)rn  playerErrorMessageRendererr  	subreasonr  z>The uploader has not made this video available in your countryavailableCountriesregionsAllowed)metadata_availabler  zsign inz,This helps protect our community. Learn morer  rn  playerCaptchaViewModelz:. YouTube is requiring a captcha challenge before playbackz-This content isn't available, try again laterr  r  a   has been rate-limited by YouTube for up to an hour. It is recommended to use `-t sleep` to add a delay between video requests to avoid exceeding the rate limit. For more information, refer to  https://github.com/yt-dlp/yt-dlp/wiki/Extractors#this-content-isnt-available-try-again-laterrf  keywordszog:video:tagzyt:stretch=z(\d+)\s*:\s*(\d+)c              3   8   #    U  H  n[        U5      v   M     g 7fr  )rl  )r  r  s     r  r  *YoutubeIE._real_extract.<locals>.<genexpr>  s     <mE!HHms   rX   r  r7  )..r   zog:imageztwitter:imager   )maxresdefaulthq720	sddefault	hqdefault0	mqdefaultr  sd1sd2sd3hq1hq2hq3mq1mq2mq3rD  rb  3c              3      >#    U  H3  nS   H)  nSSR                  TXUS:X  a  SOSTS:X  a  SOSS90v   M+     M5     g	7f)
)webpjpgr   z:https://i.ytimg.com/vi{webp}/{video_id}/{name}{live}.{ext}r  _webpr  r  _live)r  r  rS   r  r   N)r  )r  r  rS   r   r  s      r  r  r    sc      B &d# OVV! #vW2{V_G_Geg W i
 2A	
 &s   ;>c              3   N   >#    U  H  u  pS T S U 3TS   ;   d  M  Uv   M     g7f)rr  r   Nr  )r  r  tthumbr  s      r  r  r    s4     e$>DAAhZqQRPSBTX]^cXdBdaa$>s   %	%z.webpr.  r   rz   categorygenrer  externalChannelIdownerProfileUrlstartTimestampendTimestampc                    > T(       a  U R                  S5      (       d  gTS:X  a  TS:w  a  U R                  S5      S:X  a  gg g g )Nr  Tr  r   r  r  )r  r   r!  s    r  is_bad_format.YoutubeIE._real_extract.<locals>.is_bad_format  sK    $SWW_-E-E*/D	/Q
+/CC D 0R*r  r   ry   z(Last 2 hours)r  rs  r  r  r  r   )r.  r   r   r   r   z"https://www.youtube.com/channel/%srT  r   ).	viewCountinteractionCountaverage_ratingaverageRatingr   isFamilySafeFisFamilyFriendlyfalsezog:restrictions:agez18+r  r  r   r   r   playableInEmbedr   rO  r/  isShortsEligibler  rL   r  r  r   zhdr:12sourcezprefer-vp9-sortcompat_optszvcodec:vp9.2channelsrV   r  ru  )r  r3  _format_sort_fieldsc                     [        U R                  S5      =(       d    SS5      R                  SS5      =(       d    U R                  S5      $ )NvssIdr  r  r  languageCode)r-   r  r  )rb  s    r  get_lang_code.YoutubeIE._real_extract.<locals>.get_lang_code  s=     7!3!9r3?GGSQ 1yy02r  c                    > U R                  U/ 5      nTR                   H>  n0 UEU/ S.EnUR                  SUS[        S[	        X5      5      SUSS[
        U05        M@     g )N)r  xosfrS   r   rp  r  r  T)rS  _SUBTITLE_FORMATSr9  r:   r8   rT  )	r   r7  	lang_codesub_namer:  rj  	lang_subsr  r  s	           r  process_language1YoutubeIE._real_extract.<locals>.process_language  sr    !,,Y;I-- :59b9  37#<>Nx>_`H!4." 	 .r  captionsplayerCaptionsTracklistRenderertranslationLanguagesc                 $    US   =(       a    US   $ )Nr  languageNamer  r  s     r  rK  rs  0  s    Q~.D1^3DDr  r  r  r   ri  translated_subsr   r{  r|  c                 *    US   =(       a    US   S   $ )Nr7  r  r  r  r  s     r  rK  rs  8  s    ?+`*>_0``r  captionTrackskindr  za-r7  r  
clientNameSUBS_PO_TOKEN_POLICYc                     US   $ )Nr`  r  r  s     r  rK  rs  J  s    STU^S_r  r`  c              3   @   >#    U  H  o[        TS 5      ;   v   M     g7f))exp.Nr  )r  r  r  s     r  r  r  P  s     T^\"l;;^r  )xpexpvr  rD  )r  potcr  r  isTranslatableundr  z from %sr  z-origz (Original)tlangzL: There are missing subtitles languages because a PO token was not provided.z+Subtitles for these languages are missing: zAutomatic captions for z languages are missing.)rv  automatic_captionsr$  ))r!  )r!  r  )end)r  _timez
Auto-generated by YouTube.u  (?xs)
                    (?=(?P<track>[^\n·]+))(?P=track)·
                    (?=(?P<artist>[^\n]+))(?P=artist)\n+
                    (?=(?P<album>[^\n]+))(?P=album)\n
                    (?:.+?℗\s*(?P<release_year>\d{4})(?!\d))?
                    (?:.+?Released\ on\s*:\s*(?P<release_date>\d{4}-\d{2}-\d{2}))?
                    (.+?\nArtist\s*:\s*
                        (?=(?P<clean_artist>[^\n]+))(?P=clean_artist)\n
                    )?.+\nAuto-generated\ by\ YouTube\.\s*$
                rs  r2  rZ  rZ  clean_artistrf     ·rb  )rZ  r\  rb  r2  rs  )r  z!engagement-panel-comments-section)r  twoColumnWatchNextResultsresultsr  r  .r  r  . commentsEntryPointHeaderRenderercommentCountc                    > US   S   T;   $ )Nr  panelIdentifierr  )r  r  COMMENTS_SECTION_IDSs     r  rK  rs    s    Q/S-TUf-gk-r  header"engagementPanelTitleHeaderRenderercontextualInfor  r   r  r  conversationBarliveChatRenderercontinuationsreloadContinuationDatarz  z https://www.youtube.com/watch?v=z &bpctr=9999999999&has_verified=1r  )r  rR  youtube_live_chatyoutube_live_chat_replay)r   r  rS   r   	live_chatrL  r   )r  r  r  r  r  r4  videoPrimaryInfoRenderersuperTitleLinkc                     U S   S   $ )NsuperTitleIconrc  r  rJ  s    r  rK  rs    s    !$4"5j"Ar  LOCATION_PINr  u   (.+?)\s*S(\d+)\s*•?\s*E(\d+)r   )seriesseason_numberepisode_numberc                     U S   S   S   $ )NvideoActionsmenuRenderertopLevelButtonsr  rJ  s    r  rK  rs    s    a/?@QRr  )toggleButtonRenderer.)"segmentedLikeDislikeButtonRenderer.r  c                     U S   S   S   $ )NdefaultTextaccessibilityaccessibilityDatar  rJ  s    r  rK  rs    s    a&6&GH[&\r  z*(?P<count>[\d,]+)\s*(?P<type>(?:dis)?like)c                     U S   $ )Nr  r  rJ  s    r  rK  rs    s	    !O*<r  c                     U S   S   $ )Nr  r  rJ  s    r  rK  rs    s    !,?*@AT*Ur  zK(?P<type>(?:dis)?like) this video along with (?P<count>[\d,]+) other peoplert  rq  r  _countr  r  r  #segmentedLikeDislikeButtonViewModellikeButtonViewModeltoggleButtonViewModeldefaultButtonViewModelbuttonViewModelaccessibilityTextr  r   )r  videoViewCountRendererr  rM  r  videoSecondaryInfoRenderer)ownervideoOwnerRenderersubscriberCountText)r   r   )navigationEndpoint)r   runs.r  )r  r  c                     U S   S   S   $ )NmetadataRowContainermetadataRowContainerRendererr3  r  rJ  s    r  rK  rs  &  s    !234RSTZ[r  c                     U S   S   $ )NmetadataRowRendererhasDividerLiner  rJ  s    r  rK  rs  *  s    !,A*BCS*Tr  r!  )r  r   LicenserM  AlbumArtistr\  Song)r  r  r
  r  r   zhttps://www.youtube.com/%s)r   r   r   
uploadDate)timezonez%Y%m%d)r   NdateTextr   r   )r  rp  rR  )tzinfoztoday-2daysr   m3u8_native__needs_testing))r\  r^  )rb  r[  r
  	isPrivater   
isUnlisted)
is_privateneeds_premiumneeds_subscriptionr  is_unlistedr   __post_extractor)r7   	_match_idhttp_schemer  r2   r  r    r  rz  r  r  r  _preferred_langrO  r  ru  r  rh  r  r  r*   unquote_plusr9  r.   r  rx  playlist_resultr!   r(   r  rP  
report_drmr   rI  raise_geo_restrictedr!  r,   r  r[  r  raise_no_formatsr  r5  finditer_meta_regexr5   r7  r6  groups_extract_thumbnailsr  r  r&  r  rk  _remove_duplicate_formatsrm  _sort_thumbnailsr  r/   r)   rq  r  r"   r  r@  handle_from_urlr   r   rl  re  r-   rT  rW  rO  rX  r  r  rQ  rm  rC  r~  r  difference_updater  fragmentrj  r  r  r  rS  KeyError
IndexError	TypeErrorr  r  "_extract_chapters_from_descriptionr  r4   r4  r;   r#  r0   r'   r  r  r   r  r   dtdatetimefromtimestampr(  utcstrftimer6   r1   r  r   AVAILABILITY_PRIVATEr  AVAILABILITY_PUBLIC_availabilityAVAILABILITY_PREMIUMAVAILABILITY_SUBSCRIPTIONAVAILABILITY_UNLISTEDextract_commentsmark_watched)r  r   r  r7  r  r]  r  rY  r(  rq  r  playability_statusestrailer_video_idsearch_metar  r  initial_sdcrinitial_descriptioninitial_vdhrinitial_video_details_rendererinitial_titletranslated_titlevideo_titletranslated_descriptionoriginal_descriptionvideo_descriptionmultifeed_metadata_listentriesfeed_idsfeedr  feed_id
feed_titler   r   rU  r	  r  r  pemrr  r  	countriesregions_allowedr  r  keywordr~  whratior  r  thumbnail_urloriginal_thumbnailsthumbnail_namesn_thumbnail_namesr  r  r   owner_profile_urlr  live_end_timer  r  channel_handler  r  r  r$  skipped_subs_clientsr  translation_languagesget_translated_subsr  all_captionsr  need_subs_langsneed_caps_langsr2  pctrr:  innertube_client_namer  rh  
pot_paramsalready_fetched_potcaption_trackr  requires_potsubs_po_token	orig_lang	lang_name
trans_code
trans_nameorig_trans_coderu  	componentrj  r  r  d_ks_ksrs  r2  r$  r  vpirstltlbtbrsr  getterregexrt  vcrvcvsirvorr3  multiple_songsrowmrr	mrr_titlemrr_contents_textowner_badgesr   r   upload_datetimes_kr
  r/  r  r  r   r!  r  r  r  r  s   `                                                                                                                                   @@@@@@@@r  _real_extractYoutubeIE._real_extract  s   *33>>#&##%(<<+h6dhdydyXeGa.CWa  ,8 N % V ?? $++-1AC C " S(6 	 %%57L\`a#O 
 $L%I=vs3L M +<SB+Ys:D E $LS:TFC3I J PMO 	)5l5~/$E9 *: *@=? 	' NN<1 G~~<gF 	  >>,G,,A1A N#M7;N*N &&LM 	 }56 (K!%>R!S(8JK
 (<'G !!<&< $ $Mc	 	
 $ 3"+N# #=+<+<=O+P+P~~l++!8
B[\]399#>D !' 5 511$7!9IB ).G" !+G!4J'E!2j\!33NN!2"+**11(IdOA<NO/6 8 "'$  OOG,5 ?6 dkk		(+X78 ++X{4EG G  	- IJ G"9\?#KLG%k*&=>GBF 	
 xFVdlm 	Y^WFX+%z)RST>>"<==,~_tBuBu)$=TS YVX  ^^D(3`yAUW_7`F"4>>$#D#JKI''(hii ),8L MI$*56F*GBQO$9$9#$>W[	--iW[-\Byk**.'0^_F *6<<>3 ?@4C[C[B\]F3mE]`d_e5fggZZFDN%fllnc:;2PTPePen  lA  >B Bw x  %%ft%<]JdKQrG T%5%5n%EwOQOA QWWY/0O  Q  G!!-00yy!5w?4<dkkm<DAq1uQ !A!(A uuX&87<"3 4 ")    --}.KMde
#Z$AB}  )oo/

  0 B &	B 	B
  EeIo$>egxyA(/5<(?1RAPQE"RE,   	&&z2))*=>\:6N+g:N&&{m[1 (':;(;'() *
 &l4EF'	2HJZ([\%i0F&WXMo$6H $ ; ;K R	 -1C!$!6!<" BC!.sww}/EGW_b!cC 2 !11?CmU`dmUmo 	t//0@(KL--.?@"
("
["
 w"
 *	"
 &9;G"
 ,"
 *"
 <
D:^hlm"
 "
 +=79KL 3124"
 mIm_,UV"
  ,75@12g=45>  F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)N  gg34:GGG,	  NN38	$(NN3$H!	)&7DO' G+(9W"h.AR+<*=X\Y"f,(9W    //TCl0mnL|Y-?-?@@.2*++)(?[eij
 	 )L,?*U M[6L 	
 YbBKK%%iAJJ8T	, EF >";|#<=	 	 9@R1R*%%dnnT:&FGI XLW  *]%[;.UU/<DDBKKOOD\O"3M"BB	?Cwwz*m;15-. + JHCAqS	 J
 %%l4&BCoofi.L.LM S"=+TR 	 	0M0MNNH##% !-1G OOFI,J,JK T !-1G OOFI,O,OP T,2$.$6DOOFI,K,KL Q |4P $ S 	^ $(#8#8RZ\c#d ($45AQN!
 cAt &[" *i0 		sJ   =$Ab4!Ab
Ab!Ab3AbAb@-Ab
B Ab bAb7b6Ab7)r  r  r  )F)Tr  )NFr$  )a__name__
__module____qualname____firstlineno__IE_DESCr  rx  r	   _INVIDIOUS_SITES
_VALID_URL_EMBED_REGEX_RETURN_TYPEr  _formatsr  r$  r#  r"  _GEO_BYPASSIE_NAMEr4  r  _TESTS_WEBPAGE_TESTSrf  rv  rw  r  r  r  r6  classmethodr  r  r  r  r  ri  r~  r  r  ry  r  r  ru  r  r  r  r  r  r  r  r  r&  r  rB  r  r  rS  rw  r|  r  r  r  r  r  r  rD  staticmethodrp  r  r  r  r
   r  r  r  r  r  r  r  r/  r4  rl  rq  rw  r~  r)  r@  rI  r  r[  rh  r  r  __static_attributes____classcell__)r  r  r  r  s   000@r  rG   rG   W   s;   G !@ "(((3DDE "( "A H		8L& LO
lUSC5QS_eflUSC5QS_efl 	eu?l 	ecSERT`fg	l
 	ecSERT`fgl 	edcUSVbhil 	ecSERUaghl 	ecSERUaghl 	ecUfMl 	eddeTWcijl 	eddeTWcijl 	fscXVYejkl 	fscXVYejkl 	ftshWZfkll  	fttxX[glm!l" 	ecSERUagh#l$ 	ecSERUagh%l, 	es45Y\hn  B  C-l. 	es45Y\hn  B  C/l0 	es45Y\hn  B  C1l2 	etDEZ]io  @C  D3l4 	vTX^amr  CF  G5l6 	vTX^amr  CF  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F!
="J (XAS
 "D)IQNf "2!'1440059?A
 8N7S7S7U%V7Utqad7U%V"%M% %";5'nmF^	, 26$ +sZ 48 AL 
/(K    	3;&/: 
0 D=Q~]20$d) "@'7R 4 4.  0
:/bI(V 9 9	R = = 
 
"3 " "H %*oFYFYaetx$(X\fj %WO Wr4<l 	^ 	^ ^ ^#J)-VYv
55&gR$L"W. 	
i"x	 x	M? &Ws   L=ASrG   )]r  r  r  rJ  rI  r  rE  r  r5  os.pathr  rX  r5  rU  r  r  r  urllib.parser  _baser   r   r   r   r   r	   r
   r   r   pot._directorr   pot.providerr   r   openloadr   jsinterpr   r   networking.exceptionsr   utilsr   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   utils.networkingr<   r=   r>   rT  rX  rU  rV  rW  rY  rZ  rt  rG   r  r  r  <module>r     s              	 
    
 
 
 3 8 ' 5 .' ' ' ' ' ' ' ' ' 'P K J. %C "$A !'G $#?  'G $#?  K nD( nDr  