
    VGhÈ                       d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	ddl
mZ ddlmZmZ ddlmZ ddlmZmZmZmZmZmZ ddlmZ ddlmZmZmZ dd	lmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z, dd
l-m.Z.m/Z/ ddZ0 G d dejb                        Z2g dg dg dg dg ddZ3 G d dejh                        Z5d Z6d Z7y)    N   )compat_expanduser)SUPPORTED_BROWSERSSUPPORTED_KEYRINGS)list_external_downloaders)FFmpegExtractAudioPPFFmpegMergerPPFFmpegSubtitlesConvertorPPFFmpegThumbnailsConvertorPPFFmpegVideoRemuxerPPSponsorBlockPP)"DEFAULT_SPONSORBLOCK_CHAPTER_TITLE)UPDATE_SOURCESdetect_variantis_non_updateable)OUTTMPL_TYPESPOSTPROCESS_WHENConfigdeprecation_warningexpand_pathformat_fieldget_executable_pathget_system_config_dirsget_user_config_dirsjoin_nonemptyorderedSet_from_options
remove_endvariadicwrite_string)CHANNEL__version__c                    
 d
t        t                     dk(  r| d ud 
fdd
fd	fd}t        j                  ddd	      }	 	 | j	                  | d
       n$j	                  t
        j                  dd  d       t         |             }|r`j                         d   j                  rCt        d t        j                        D        d       }|j                  j!                  |       	 j                  d   j#                          j%                         \  }}	 |j0                  xr d j3                  dd      dd  }	|	rt5        |	 d       |j6                  r(|	rt5        d       j                  j7                          	 |j6                  rt        j8                          j                  ||fS # t        $ r }j                  j                  |      d }~ww xY w# t        $ r }j                  j                  |      d }~ww xY w# t        j&                  $ rO t)        j*                  t        j&                        5  j                  d      \  }}d d d         # 1 sw Y    xY wt,        t.        f$ r	 d|_         w xY w# |j0                  xr d j3                  dd      dd  }	|	rt5        |	 d       |j6                  r(|	rt5        d       j                  j7                          w w xY w)Nyt-dlpif_overridec                  v    t        j                  j                  |  }t        j                  |d       }|||fS y )Ndefault)ospathjoinr   	read_file)pathsr)   confs      W/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/yt_dlp/options.pyread_configzparseOpts.<locals>.read_config2   s;    ww||U#d3:     c              3   R  K   | D ]  }t         j                  j                  |      \  }}|k(  s1|t         j                  j                  t	        d      d       k(  sJ  | d       |j                  d      r | d        |d        |d        y w)N~.z.confz	.conf.txtconfigz
config.txt)r(   r)   splitr*   r   
startswith)config_dirs
config_dirheadtailPACKAGE_NAMEr/   s       r.   _load_from_config_dirsz)parseOpts.<locals>._load_from_config_dirs8   s     % 	8Jz2JD$<':FWX[F\`abnao^p9q+qqqd|nE$:;;s#!$<.	(BCCj(33j,77	8s   B$B'c           
      4   j                         d   j                  ry|r*|J t        t        d  |                  d      \  }}n7t        j
                  j                  |d      }t        j                  |d      }|j                  |||        y)	z- Adds config and returns whether to continue r   FNNNzyt-dlp.confr&   labelT)
parse_known_argsignoreconfignextfilterr(   r)   r*   r   r+   append_config)r@   r)   funcargscurrent_pathr;   r<   roots        r.   
add_configzparseOpts.<locals>.add_configC   s      "1%22<<!%t3D4FGH,"XD, 77<<m<L##L$?Dt\?r0   c            	   3     K       dt                        dt        j                         d   j                  j	                  dd            j                                  dt                 dt               y w)	NPortableHomer   home User)rF   System)r   r   rA   r,   getstripr   r   )rJ   ignore_config_filesrI   s   r.   load_configszparseOpts.<locals>.load_configsR   s{     %%%%8%:;;T-B-B-DQ-G-M-M-Q-QRXZ\-]!^!d!d!fgg&:;;(>??s   BB
TF)verbose
print_helpOverrider?   r   zCommand-liner   c              3   F   K   | ]  \  }}|j                   d k(  s|  yw)rP   Nr?   ).0ir-   s      r.   	<genexpr>zparseOpts.<locals>.<genexpr>h   s      !c4djj\bNb!!cs   !!)strict
z
| z	
[debug] r>   )r   create_parseroptparseValuesrE   sysargvall
ValueErrorparsererrorrA   rB   rC   	enumerateconfigspoprU   
parse_argsOptParseError
contextlibsuppress
SystemExitKeyboardInterruptrV   replacer   rW   exit)overrideArgumentsrT   rU   optsloaded_all_configserr	user_confrG   _rV   r;   r<   rJ   r/   rI   s    `        @@@@@r.   	parseOptsry   +   s   L-/"Dm+/t;	8@ ??t5ABD&%	) ,""#4J"G""388AB<~"F!$\^!4  $$&q)66 !c9T\\3J!ceij	(LL$$Y/	)LLO((* __&
d ,,PRv;#6#6v|#LQR#PG9B(??T"KK""$
;;d""E  	)++##C((	)  	)++##C((	) !!   !7!78 	:++5+9GD!	:	:)*  ,,PRv;#6#6v|#LQR#PG9B(??T"KK""$ su   A
G !A"H& G: !H& 	G7G22G77H& :	H#HH##H& &6JI;2	J;J	 JJ! !A,Lc                   .     e Zd Z fdZed        Z xZS )_YoutubeDLHelpFormatterc                     t        j                         j                  xs d}t        |   |t        d|z               y )NP   g?)widthmax_help_position)shutilget_terminal_sizecolumnssuper__init__int)self	max_width	__class__s     r.   r   z _YoutubeDLHelpFormatter.__init__   s8    ,,.66<"	yCy@P<QRr0   c                     t        | j                  xr | j                  d   | j                  xr | j                  d   d      }| j                         r|d| j                   z  }|S )z, ('-o', '--option') -> -o, --format METAVAR r   , )delim )r   _short_opts
_long_optstakes_valuemetavar)optionrt   s     r.   format_option_stringsz-_YoutubeDLHelpFormatter.format_option_strings   sl     86#5#5a#86&"3"3A"6 a'((Dr0   )__name__
__module____qualname__r   staticmethodr   __classcell__r   s   @r.   r{   r{      s    S  r0   r{   )-fzba[acodec^=mp3]/ba/b-x--audio-formatmp3)r   z)ba[acodec^=aac]/ba[acodec^=mp4a.40.]/ba/br   r   aac)--merge-output-formatmp4--remux-videor   -Sz2vcodec:h264,lang,quality,res,fps,hdr:12,acodec:aac)r   mkvr   r   )--sleep-subtitles5--sleep-requestsz0.75--sleep-interval10--max-sleep-interval20)r   r   r   r   sleepc                        e Zd ZdZdZ fdZej                  ej                  fZ	ej                  Zd
dZd Zd Zd Z fdZd fd		Z xZS )_YoutubeDLOptionParser_triggered_aliasesd   c                     t         |   t               dk(  rdnd t        ddt	               d       | j                  | j                  t        j                  t                     y )Nsourcer#   z%prog [OPTIONS] URL [URL...]zBSee full documentation at  https://github.com/yt-dlp/yt-dlp#readmeresolve)progversionusageepilog	formatterconflict_handler)
r   r   r   r!   r{   set_default
ALIAS_DESTcollectionsdefaultdictr   )r   r   s    r.   r   z_YoutubeDLOptionParser.__init__   sW    +-9t0W-/& 	 	
 	+*A*A#*FGr0   c                    | j                  |      g c| _        | _        |xs | j                         | _        | j                  r| j                  d   }	 |dk(  r| j                  d= n|j                  d      r'| j                  | j                  | j                         n|j                  d      r,|dk7  r'| j                  | j                  | j                         nB| j                  r5| j                  j                  | j                  j                  d             nn| j                  r| j'                  | j                  | j                        S # t        j                  $ ry}t        || j                        r&| j                  j                  |j                         n3|r1t        || j                         r| j#                  t%        |              Y d}~d}~ww xY w)zUSame as parse_args, but ignore unknown switches. Similar to argparse.parse_known_argsr   ---N)	_get_argsrargslargsget_default_valuesvaluesr6   _process_long_opt_process_short_optsallow_interspersed_argsappendrj   r`   rl   
isinstance_UNKNOWN_OPTIONopt_str_BAD_OPTIONrg   strcheck_values)r   rG   r   r]   argrv   s         r.   rA   z'_YoutubeDLOptionParser.parse_known_args   sb   !%!5r
DJ9 7 7 9jj**Q-C$;

1^^D)**4::t{{C^^C(SCZ,,TZZE11JJ%%djjnnQ&78 jj*   djj99 )) c4#7#78JJ%%ckk2!#t'7'78

3s8,s    E 'B6E G$A/GGc                     | j                          dt        |      j                          d}| j                  r| j	                          d| S |S )Nz	: error: r^   )get_prog_namer   rS   r   	get_usager   msgs     r.   _generate_error_messagez._YoutubeDLOptionParser._generate_error_message   sN    ##%&iC0@/AD/3zz$.."#2cU+BsBr0   c                 J    t        j                  | j                  |            N)r`   rl   r   r   s     r.   rg   z_YoutubeDLOptionParser.error   s    $$T%A%A#%FGGr0   c                 B    |t         j                  dd  S t        |      S )Nr   )rb   rc   list)r   rG   s     r.   r   z _YoutubeDLOptionParser._get_args   s    #|sxx|;d;r0   c                     	 t         |   |      S # t        j                  $ rS}t	        |j
                  D ch c]  }| j                  |    nc c}w c}      dk(  r|j
                  d   cY d}~S  d}~ww xY w)z]Improve ambiguous argument resolution by comparing option objects instead of argument stringsr   r   N)r   _match_long_optr`   AmbiguousOptionErrorlenpossibilities	_long_opt)r   optepr   s       r.   r   z&_YoutubeDLOptionParser._match_long_opt   sh    	7*3//,, 	q?!DNN1%??@AEq))	s+    A8A3A
A3,A82A33A8c                 (   |sJ d       t         
|   |      }|j                          |j                  d      }|j                          |j	                  d      }g }t
        j                         D ]a  \  }}t        j                  dt        j                  |            }d| |j                  |<   |j                  |j                  |             c |j                          |j                          dj                  |      }	| d| | d|	 S )	NzFormatter can not be None)r   zPreset AliaseszPredefined aliases for convenience and ease of use. Note that future versions of yt-dlp may add or adjust presets, but the existing preset names will not be changed or removed-t)helpz-t r^   )r   format_option_helpindentformat_headingformat_description_PRESET_ALIASESitemsr`   Optionshlexr*   option_stringsr   format_optiondedent)r   r   formatted_helpheadingdescriptionresultnamerG   r   
help_linesr   s             r.   r   z)_YoutubeDLOptionParser.format_option_help   s   555y3i3H**+;<22fg )//1 	;JD$__T

40@AF14TF|I$$V,MM)11&9:	; 	YYv&
 !G9[MJ<HHr0   )NNTr   )r   r   r   r   ALIAS_TRIGGER_LIMITr   r`   BadOptionErrorr   r   OptionValueErrorr   rA   r   rg   r   r   r   r   r   s   @r.   r   r      s^    %J	H  ..0M0MNO++K:6CH<I Ir0   r   c                  S   ddt         j                  fd} di d fd}ddd d dt         j                  dfd	fd
}t               }t	        j
                  |d      t        j                         fd}d d }t	        j
                  |d      }|j                  ddddd       |j                  ddd       |j                  ddddt        t        t               d ddt         d !      "       |j                  d#d$dd%&       |j                  d'd(dd)d*t        j                  d+      d,    d-d.j                  t               /       |j                  d0d1dd2d3&       |j                  d4dd2d5d6"       |j                  d7d8d$d2d9&       |j                  d:dd;dd<=       |j                  d>dd?dd@=       |j                  dAddBddC=       |j                  dDdEdFdGdHdIg | dJK	       |j                  dLddMdt        j                  =       |j                  dNdOdPdQR       |j                  dSdTddUdV&       |j                  dWddXd dY"       |j                  dZdXd[d\d]^       |j                  d_d[d`dF| dIdad idbgdcd	       |j                  ded`dg dfg       |j                  dhddidjddkl       |j                  dmd$didn&       |j                  doddpdq&       |j                  drd$dpds&       |j                  dtdudvd dwx       |j                  dydudd dzg       |j                  d{dd|dd}=       |j                  d~d$d|d&       |j                  dddddddt        j                  "       |j                  dddi dIdFdddgt         j                  dd	       |j                  dddt!               dIdF|h dg dg dg dg dddgg ddd	       |j                  ddddIddF|dt        j"                   d       |j                  dddddIdF|dd.j                  t$               d       t	        j
                  |d      }|j                  ddd dd       |j                  ddt&        d dd       |j                  dddd d       |j                  dddd d       |j                  ddddd       |j                  ddddddìī       |j                  ddddddȬī       |j                  dddddˬ=       t	        j
                  |d̫      }|j                  ddd ddϬ       |j                  ddd dt        j                         |j                  ddddbdլ       |j                  ddddbt        j                  "       |j                  ddddt        j                  "       |j                  dddt        j                  ۫       |j                  dddt        j                  ۫       t	        j
                  |dޫ      }	|	j                  ddddt(        t        j                         |	j                  dddd t(        t        j                         |	j                  ddddd dx       |	j                  dddt        j                  R       |	j                  dddt        j                  R       |	j                  dddd d󬷫       |	j                  dddd d       |	j                  dddd d       |	j                  dddd d       |	j                  dddd d        |	j                  dddd t(        t        j                         |	j                  dddd t(        t        j                         |	j                  ddd	d\d
       |	j                  dd	dd dg       |	j                  dddd\d       |	j                  dddd dg       |	j                  ddddd=       |	j                  dd$dd&       |	j                  dddd t(        d       |	j                  dddd۫       |	j                  d ddd d!g       |	j                  d"d#dt(        d d$%       |	j                  d&dd'dd(=       |	j                  d)d$d'd*&       |	j                  d+dd,dt        j                  =       |	j                  d-dd.dd/=       |	j                  d0d$d.d1&       |	j                  d2d3d4d t(        d5       |	j                  d6d7dt        j                         |	j                  d8d7d$t        j                         t	        j
                  |d9      }
|
j                  d:d;d<d=d>R       |
j                  d?d@dAdBdCR       |
j                  dDdEdFdGdHR       |
j                  dIdJddKddL=       |
j                  dMdNd[dOR       |
j                  dPdQdRdSR       |
j                  dTdUdBdVR       |
j                  dWdXdYdZR       |
j                  d[d\d=d]R       |
j                  d^d_dBd`R       |
j                  daddbddc=       |
j                  dddedfdgR       |
j                  dhdidjdkR       |
j                  dldmdBdnR       t	        j
                  |do      }|j                  dpdqd(drdsd dtu       |j                  dvdwdxdyg dIdF| d\dzid{
       |j                  d|d}dd~dsddu       |j                  dd$d~dsddu       |j                  dddd d=       |j                  dd$dd&       |j                  dddd d=       |j                  dd$dd&       |j                  dddrdt        j                  "       |j                  ddddd=       |j                  dd$ddd=       |j                  ddddd d       |j                  dddd&       |j                  dd$dd&       |j                  ddddd&       |j                  ddddt        j                  =       |j                  ddd$dt        j                  &       |j                  dd(ddsd dd.j                  t+        t,        j.                               du       |j                  ddddt        j                  =       |j                  dd$dt        j                  &       t	        j
                  |d      }|j                  dddddd=       |j                  ddd$dd&       |j                  dddddd=       |j                  ddd$ddd=       |j                  ddddt        j                  =       |j                  ddddd=       |j                  dd(ddsddu       |j                  dÐddFdŐddIg | dǬK	       t	        j
                  |dȫ      }|j                  dɐdʐdːd3dt(        d̬       |j                  d͐dΐdϐdАdѐdҬR       |j                  dӐdԐdѐdլR       |j                  d֐dאdؐdِdڐd۬x       |j                  dܐdݐdِdސd߬x       |j                  dddِdڐdx       |j                  dddi dIdFdddd鬌	       |j                  dddddd=       |j                  ddd$dd&       |j                  ddddd=       |j                  dd$dd&       |j                  dddddx       |j                  dd$dd&       |j                  ddddd=       |j                  dd dd dx       |j                  ddddt        j                  =       |j                  dddt        j                  &       |j                  dd$dt        j                  &       |j                  dddd	&       |j                  d
ddd&       |j                  dd$dd&       |j                  dddd       |j                  dddd t        j                         |j                  ddd$d t        j                         |j                  dddd d       |j                  ddd$d       |j                  dddd\d       |j                  ddd d!i dIdFd"dbt         j                  dd#d.j                  t+        t1                            d$
       |j                  d%d&d'd(i dIdFd)j3                  d*j                  t5        t6        j8                  t1                                 dbt:        j<                  dd+
       t	        j
                  |d,      }|j                  d-d.d/d0R       |j                  d1dd2dd3=       |j                  d4dd5dd6=       |j                  d7d8dd9d:&       |j                  d;d<d=t        j                  ۫       |j                  d>dd?d t        j                         |j                  d@dAdBi dIdFdCdidD	       |j                  dEdFddG       |j                  dHddIt&        dJK       |j                  dLdMddNt&        dOK       |j                  dPddQt&        dRK       |j                  dSddTd,t(        dU       t	        j
                  |dV      }|j                  dWdXddYd dZ=       |j                  d[d$dYd\&       |j                  d]d^ddd_       |j                  d`daddbd dc=       |j                  ddd$dbde&       |j                  dfddgddh=       |j                  did$dgdj&       |j                  dkdlddmddn=        |j                  	 d=dodpdq |dr      dsdti  |j                  	 d>dudvddw |dr      dsdxi |j                  dydzdd{dt        j                  =       |j                  d|d}dd~dt        j                  =       |j                  ddddt        j                  =       |j                  ddddt        j                  =       |j                  ddddt        j                  =       |j                  ddddt        j                  =       |j                  ddddt        j                  =       |j                  ddddt        j                  =       |j                  dddddd=       |j                  dddddd=       |j                  ddddt        j                  =       |j                  ddddddd=       |j                  ddddd=       |j                  dddd d=       |j                  dd$dd&       |j                  ddddd=       |j                  dddi dIdFdddd	       |j                  ddd(dt&        d,d       |j                  dddddd=       |j                  dddddd=       |j                  ddddd=       |j                  ddddt        j                  =       |j                  ddddt        j                  =       |j                  dddddd       |j                  ddÐdddt        j                         |j                  dŐdd$t        j                         t	        j
                  |dƫ      }|j                  dǐdȐdɐddʬR       |j                  dːddd d̬g       |j                  ddddt        j                  ϫ       |j                  dАdѐdҐdi dIdFdj3                  d*j                  t5        t6        j8                  t?        j@                                           dՐdd֬
       |j                  dאdؐddi dIdFd*j                  t5        t6        j8                  t?        j@                                     dbddڬ
       |j                  dېdܐdݐdސd߬x       |j                  dddt(        t        j                         |j                  ddddt(        t        j                         |j                  ddddd=       |j                  dd$dd&       |j                  dddd d=       |j                  dd$dd&       |j                  ddddd,t(        d       |j                  ddd$dd d=       |j                  ddddd&       |j                  dddd d"       |j                  dddddd =       |j                  dd$dd&       |j                  dd$ddd=       |j                  dddd&       |j                  ddd	dd
=       |j                  dd$d	d&       |j                  ddddd=       |j                  dd$dd&       |j                  dddd d=       |j                  dd$dd&       |j                  ddddt        j                  =       |j                  dd$dt        j                  &       |j                  dddd d=       |j                  dd$dd&       |j                  dd dd!d d"=       |j                  d#d$d$d!d%&       |j                  d&d'dd(dd)=       |j                  d*d+d$d(d,&       |j                  d-d.d/dd0R       |j                  d1d2dd3R       |j                  d4dd d2dd56       |j                  d7d8d9d:d.j                  t+        tB                     d;d.j                  t5        t         j                  t+        tD                           R       |j                  d<dd d8d=ī       |j                  d>d?d d@dA       |j                  dBd$d?dC&       |j                  dDddEdF&       t	        j
                  |dG      }|j                  dHdFdIddJ dKL       |j                  dMd$dIdN&       |j                  dOddIddP"       |j                  dQddRddS=       t	        j
                  |dT      }|j                  dUddVddW=       |j                  dXddYddZ=       |j                  d[dd\dd]=       |j                  d^dd_dd`=       t	        j
                  |da      }|j                  dbdcddddde=       |j                  dfdsdgddhd.j                  t+        tF        j.                               di       |j                  djdkdldmdn       |j                  dodsdpd dqd.j                  tH        j.                         dr       |j                  dsdsdtd du       |j                  dvdwd'dxi dIdFdydzt:        j<                  dd{d|
       |j                  d}d~dddd=       |j                  dd$dd&       |j                  dd$dd&       |j                  ddddd=       |j                  ddddd=       |j                  dd$dd&       |j                  ddddd=       |j                  dd$dd&       |j                  dddddd=       |j                  ddd$dd&       |j                  ddddd d=       |j                  ddd$dd&       |j                  dddd d=       |j                  dd$dd&       |j                  ddsdt        j                  ۫        |j                  	 d?dddq |d      dsdi  |j                  	 d@dddސd |d      dsdi |j                  dddddd=       |j                  dddddd       |j                  dddd dd       |j                  ddd$dt        j                  &       |j                  dddddt        j                  =       |j                  ddd[dĐdŬ۫        |j                  	 dAdƐdǐdq |dȫ      dsdi |j                  dddi dˬ"       |j                  d̐dd\dt        j                  ϫ       |j                  dddd t        j                  "       |j                  dѐdҐdӐdsdd dd.j                  t+        tJ        j.                               d֝       |j                  dאdsdd dd.j                  t+        tL        j.                               dڝ       |j                  dېdܐddddސ       |j                  dߐddd$d       |j                  dddd\d       |j                  dddd dg       |j                  ddddd=       |j                  dd$dd&       dBd|j                  dddg dIdF| d fddd󬚫	       t	        j
                  |dd      }|j                  dddt!               dFdI|tN        jP                  jA                         dbdgiddd.j                  tN        jP                  jA                                d	       |j                  dddt!               dFdI|t!        tN        jP                  jA                               t!        tN        jR                  jA                               z
  dbddgidd d.j                  tN        jR                  jA                                d	       |j                  ddtT        dd       |j                  ddddd	ϫ       |j                  d
dddd       |j                  ddddt        j                  =       |j                  dd$dt        j                  &       |j                  ddddt        j                  ϫ       |j                  dd$dt        j                  &       |j                  ddddt        j                  ϫ       |j                  dddt        j                  &       |j                  dd[ddt        j                         |j                  dddt        j                  R       t	        j
                  |d      }|j                  dddِdސdx       |j                  d d!dd"dd#=       |j                  d$d%d$d"d&&       |j                  d'd(ddd)       |j                  d*d(d$d+       dBd,|j                  d-d.d/i dIdFdfd0d1d2	       |j                  d3d4dd5dt        j                  =       |j                  d6d7d$d5t        j                  &       |j                  d8d9dd:dt        j                  =       |j                  d;d<d$d:t        j                  &       |jW                  |       |jW                  |       |jW                  |       |jW                  |	       |jW                  |       |jW                  |       |jW                  |       |jW                  |       |jW                  |       |jW                  |       |jW                  |       |jW                  |       |jW                  |
       |jW                  |       |jW                  |       |jW                  |       |S (C  NT,c                 4   |r)t        t        |j                  | j                              ng }t        t	        d |	 ||      gnt        ||j                  |                        }t        |j                  | j                  |du r
||z          y ||z          y NT)r   getattrr   destrD   mapr5   setattr)r   r   valuerf   r   r   processcurrents           r.   _list_from_options_callbackz2create_parser.<locals>._list_from_options_callback   s    ?E$wv}}fkk:;2VDem75>"2WV[VaVabgVhIijkMM6;;%~GeO	D387?	Dr0   c                 >    | j                         j                         S r   )lowerrS   )xs    r.   <lambda>zcreate_parser.<locals>.<lambda>  s    aggioo/ r0   c           
         |	 ||      gnt        ||j                  |            }	 t        |t        j                  |d|i      t        |j                  | j                              }	t        |j                  | j                  t        |	             y # t        $ r:}
t        j                  d| j                   d| d|
j                  d          d }
~
ww xY w)Nrd   )startwrong z for z: r   )r   r5   r   r   ChainMapr   r   r   re   r`   r   r   rG   r   set)r   r   r  rf   allowed_valuesr   aliasesr  r   	requestedr   s              r.   _set_from_options_callbackz1create_parser.<locals>._set_from_options_callback   s     &+]'%.!GU[[QVEW8X	b/8L8LWW\^lVm8n6=fmmV[[6Y[I
 	v{{C	N;  	b++fV^^4DE'RTUVU[U[\]U^T_,`aa	bs   AB 	C5CCz[\w-]+:Fc           	         t        t        |j                  | j                              }t	        |t
               }|r	d| d| d}t        j                  d| d| d|r|d   n|      }|<|j                  d      j                  d	      |j                  d
      }}|rB|g|dd  }n9|t        |      |}}n)t        j                  d| d| j                   d| d      	 |	rt        |	|      n|}|r ||      n|}|D ]  }|
rg |j!                  |g       |n|||<   ! t#        |j                  | j                  |       y # t        $ r }t        j                  d| d|       d }~ww xY w)N(z)(,(z))*z(?is)(?P<keys>)z(?P<val>.*)$r   keysr   valr   r  z formatting; it should be z, not "" formatting; )dictr   r   r   r   r   rematchgroupr5   r   r`   r   r   r   	ExceptionrR   r   )r   r   r  rf   allowed_keys	delimiterdefault_keyr  multiple_keysprocess_keyr   out_dictmultiple_argsmobjr  r  rv   keys                     r.   _dict_from_options_callbackz2create_parser.<locals>._dict_from_options_callback  s   
 v{{;<&uc22~T,sCLxxl^1YK|D%E!H52 

6*005tzz%7H#D'U12Y'$ -u#D++	!;FNN;K7SXRYYZ[] ]	R-83{D)dD")'#,sC  	MC=C9hll339S9HSM	Mv{{H5	  	R++fWI]3%,PQQ	Rs   "E 	E-E((E-c           
      t    i dddj                  t        t        j                  t                    | ddddS )Nr   callback|FT)r  r!  r"  r   )r'   typeactionr*  callback_kwargs)r*   r   r  escaper   )r'   r(  s    r.   when_prefixz"create_parser.<locals>.when_prefix*  s?     3 #RYY8H)I J&!&	 
 	
r0   Aliasesc                    |\  }}	 t        t        j                  |            D ch c]  \  }\  }}}}|	|dk(  r|n| c}}}      }	 |j                  t	        t
        t        |	              |j                  vr|j                         d t	        t
        j                  |j                  d            D        }	 t        |	      D cg c]  }d| 	 }} j                  ||	|j                  |	rdnd dj!                  |       |j                  | d	||	d
d y c c}}}w # t        $ r }
t        j                  d| d|
       d }
~
ww xY wc c}w # t        $ r }
t        j                  d| d|
       d }
~
ww xY w)NrO   r  z OPTIONS formatting; c              3   L   K   | ]  }|j                  d       r|nd|   yw)r   r   N)r6   )rZ   r  s     r.   r\   z7create_parser.<locals>._create_alias.<locals>.<genexpr>G  s&     dAS)1A3x7ds   "$r   ARGr   r   r*  )rt   nargs)r5  r   r,  r   r   r-  r*  r.  r  )r   rh   parseformatr   r   ranger  r`   r   option_groupsadd_option_grouprS   r5   
add_optionr   r*   )r   r   r  rf   r  rt   r[   rx   fr5  rv   rG   	Formatter_alias_callbackalias_groups               r.   _create_aliasz$create_parser.<locals>._create_alias<  s   	Z09)//$:O0Pc c,QAq!TUTa  2g1, c dEDKKS%,/0 f222##K0dSYYPWP]P]^aPbAcd	R',U|4!c!I4D4"K""F,=,=UEX\[T[[$-?
(4RW:XZc  	Z++fWI=RSVRW,XYY	Z 5
  	R++fWI]3%,PQQ	RsS   #D- D&/D- E EAE &D- -	E6EEE 	F'FFc                    t        |j                  | j                        }||xx   dz  cc<   ||   |j                  kD  rt	        j
                  d| d      |dk(  r|g}|dk(  r|t        |      |k(  sJ t        j                  ||n& |j                  t        t        j                  |             |j                  d d y )Nr   zAlias z exceeded invocation limitr   )r   r   r   r   r`   r   r   r   r5   r7  r   quoter   )r   r   r  rf   rt   r5  counters          r.   r>  z&create_parser.<locals>._alias_callbackQ  s    &--5A7f888++fWI=W,XYYA:GE
u}Uu1DDD ;;MD{t{{CU4K'LNRar0   c                 v    |sy |t         vrt        j                  d|       t         |   |j                  d d y )NzUnknown preset alias: r   )r   r`   r   r   )r   r   r  rf   s       r.   _preset_alias_callbackz-create_parser.<locals>._preset_alias_callback\  s>    '++.DUG,LMM*51Rar0   zGeneral Optionsz-hz--helprW   
store_truezPrint this help text and exit)r   r-  r   z	--versionr   zPrint program version and exit)r-  r   z-Uz--updatestore_constupdate_selfz"Check if updates are available. %sz"Update this program to the latest z versionr&   )r-  r   constr   z--no-updatestore_falsez"Do not check for updates (default))r-  r   r   z--update-tostorez[CHANNEL]@[TAG]zjUpgrade/downgrade to a specific version. CHANNEL can be a repository as well. CHANNEL and TAG default to "@r   zV" and "latest" respectively if omitted; See "UPDATE" for details. Supported channels: r   )r-  r   r   r   z-iz--ignore-errorsignoreerrorszvIgnore download and postprocessing errors. The download will be considered successful even if the postprocessing failsz--no-abort-on-erroronly_downloadzdContinue with next video on download errors; e.g. to skip unavailable videos in a playlist (default)z--abort-on-errorz--no-ignore-errorszRAbort downloading of further videos if an error occurs (Alias: --no-ignore-errors)z--dump-user-agentdump_user_agentz'Display the current user-agent and exit)r-  r   r'   r   z--list-extractorslist_extractorsz&List all supported extractors and exitz--extractor-descriptionslist_extractor_descriptionsz8Output descriptions of all supported extractors and exitz--use-extractorsz--iesr*  allowed_extractorsNAMESr   a#  Extractor names to use separated by commas. You can also use regexes, "all", "default" and "end" (end URL matching); e.g. --ies "holodex.*,end,youtube". Prefix the name with a "-" to exclude it, e.g. --ies default,-generic. Use --list-extractors for a list of extractor names. (Alias: --ies))r-  r   r   r,  r'   r*  r   z--force-generic-extractorforce_generic_extractorz--default-searchdefault_searchPREFIXaq  Use this prefix for unqualified URLs. E.g. "gvsearch2:python" downloads two videos from google videos for the search term "python". Use the value "auto" to let yt-dlp guess ("auto_warning" to emit a warning when guessing). "error" just throws an error. The default value "fixup_error" repairs broken URLs, but emits an error if this is not possible instead of searching)r   r   r   z--ignore-configz--no-configrB   zDon't load any more configuration files except those given to --config-locations. For backward compatibility, if this option is found inside the system configuration file, the user configuration is not loaded. (Alias: --no-config)z--no-config-locationsconfig_locationszDo not load any custom configuration files (default). When given inside a configuration file, ignore all previous --config-locations defined in the current filez--config-locationsPATHr   zLocation of the main configuration file; either the path to the config or its containing directory ("-" for stdin). Can be used multiple times and inside other configuration files)r   r   r-  r   z--plugin-dirsplugin_dirsr   r'   zPath to an additional directory to search for plugins. This option can be used multiple times to add multiple directories. Use "default" to search the default plugin directories (default))r   r   r-  r*  r,  r.  r'   r   z--no-plugin-dirszcClear plugin directories to search, including defaults and those provided by previous --plugin-dirs)r   r-  rI  r   z--flat-playlistextract_flatin_playlistzrDo not extract a playlist's URL result entries; some entry metadata may be missing and downloading may be bypassed)r-  r   rI  r'   r   z--no-flat-playlistz0Fully extract the videos of a playlist (default)z--live-from-startlive_from_startzeDownload livestreams from the start. Currently experimental and only supported for YouTube and Twitchz--no-live-from-startz4Download livestreams from the current time (default)z--wait-for-videowait_for_videoz	MIN[-MAX]zuWait for scheduled streams to become available. Pass the minimum number of seconds (or range) to wait between retries)r   r   r'   r   z--no-wait-for-videoz+Do not wait for scheduled streams (default)z--mark-watchedmark_watchedz*Mark videos watched (even with --simulate)z--no-mark-watchedz$Do not mark videos watched (default)z--no-colorsz--no-colourscolorno_color)stdoutstderrz--colorz[STREAM:]POLICYzstdout|stderrra  rb  )r  r!  r  a?  Whether to emit color codes in output, optionally prefixed by the STREAM (stdout or stderr) to apply the setting to. Can be one of "always", "auto" (default), "never", or "no_color" (use non color terminal sequences). Use "auto-tty" or "no_color-tty" to decide based on terminal support only. Can be used multiple times)r   r   r'   r,  r-  r*  r.  r   z--compat-optionsOPTScompat_opts>   format-sortformat-speclist-formatsno-keep-subsno-live-chatabort-on-errorembed-metadataplaylist-indexno-direct-mergeallow-unsafe-extno-clean-infojsonno-attach-info-jsonno-playlist-metafilesseperate-video-versionsno-youtube-channel-redirectembed-thumbnail-atomicparsleyno-youtube-unavailable-videos!no-youtube-prefer-utc-upload-datefilenamemultistreams
no-certifiprefer-vp9-sortfilename-sanitizationplaylist-match-filtermanifest-filesize-approxprefer-legacy-http-handlerno-external-downloader-progress)rd   z-multistreams-playlist-match-filter-manifest-filesize-approx-allow-unsafe-ext-prefer-vp9-sort)rd   z-no-youtube-channel-redirectz-no-live-chatr  r  r  r  )2022ry  r{  )2023r  r|  r~  r}  2024rz  )z
youtube-dlzyoutube-dlc2021r  r  r  )r  r  zOptions that can help keep compatibility with youtube-dl or youtube-dlc configurations by reverting some of the changes made in yt-dlp. See "Differences in default behavior" for details)r   r   r'   r,  r-  r*  r.  r   z--aliaszALIASES OPTIONSrx      aD  Create aliases for an option string. Unless an alias starts with a dash "-", it is prefixed with "--". Arguments are parsed according to the Python string formatting mini-language. E.g. --alias get-audio,-X "-S aext:{0},abr -x --audio-format {0}" creates options "--get-audio" and "-X" that takes an argument (ARG0) and expands to "-S aext:ARG0,abr -x --audio-format ARG0". All defined aliases are listed in the --help output. Alias options can trigger more aliases; so be careful to avoid defining recursive options. As a safety measure, each alias may be triggered a maximum of z. times. This option can be used multiple times)r   r   r,  r5  r-  r*  r   r   z--preset-aliasPRESETzcApplies a predefined set of options. e.g. --preset-alias mp3. The following presets are available: zc. See the "Preset Aliases" section at the end for more info. This option can be used multiple times)r   r   r,  r-  r*  r   zNetwork Optionsz--proxyproxyURLzUse the specified HTTP/HTTPS/SOCKS proxy. To enable SOCKS proxy, specify a proper scheme, e.g. socks5://user:pass@127.0.0.1:1080/. Pass in an empty string (--proxy "") for direct connection)r   r'   r   r   z--socket-timeoutsocket_timeoutSECONDSz)Time to wait before giving up, in seconds)r   r,  r'   r   r   z--source-addressIPsource_addressz!Client-side IP address to bind to)r   r   r'   r   z--impersonatezCLIENT[:OS]impersonatezClient to impersonate for requests. E.g. chrome, chrome-110, chrome:windows-10. Pass --impersonate="" to impersonate any client. Note that forcing impersonation for all requests may have a detrimental impact on download speed and stabilityz--list-impersonate-targetslist_impersonate_targetsz&List available clients to impersonate.)r   r'   r-  r   z-4z--force-ipv4z0.0.0.0zMake all connections via IPv4)r-  rI  r   r   z-6z--force-ipv6z::zMake all connections via IPv6z--enable-file-urlsenable_file_urlszFEnable file:// URLs. This is disabled by default for security reasons.zGeo-restrictionz--geo-verification-proxygeo_verification_proxyzUse this proxy to verify the IP address for some geo-restricted sites. The default proxy specified by --proxy (or none, if the option is not present) is used for the actual downloadingz--cn-verification-proxycn_verification_proxyz--xffVALUE
geo_bypasszHow to fake X-Forwarded-For HTTP header to try bypassing geographic restriction. One of "default" (only when known to be useful), "never", an IP block in CIDR notation, or a two-letter ISO 3166-2 country codez--geo-bypassz--no-geo-bypassneverz--geo-bypass-countryCODE)r   r   r   z--geo-bypass-ip-blockIP_BLOCKzVideo Selectionz--playlist-startplayliststartNUMBERr   )r   r   r'   r,  r   z--playlist-endplaylistendz-Iz--playlist-itemsplaylist_items	ITEM_SPECal  Comma separated playlist_index of the items to download. You can specify a range using "[START]:[STOP][:STEP]". For backward compatibility, START-STOP is also supported. Use negative indices to count from the right and negative STEP to download in reverse order. E.g. "-I 1:3,7,-5::2" used on a playlist of size 15 will download the items at index 1,2,3,7,11,13,15z--match-title
matchtitleREGEXz--reject-titlerejecttitlez--min-filesizeSIZEmin_filesizezBAbort download if filesize is smaller than SIZE, e.g. 50k or 44.6Mz--max-filesizemax_filesizezAAbort download if filesize is larger than SIZE, e.g. 50k or 44.6Mz--dateDATEdatezDownload only videos uploaded on this date. The date can be "YYYYMMDD" or in the format [now|today|yesterday][-N[day|week|month|year]]. E.g. "--date today-2weeks" downloads only videos uploaded on the same day two weeks agoz--datebefore
datebeforezfDownload only videos uploaded on or before this date. The date formats accepted are the same as --datez--dateafter	dateafterzeDownload only videos uploaded on or after this date. The date formats accepted are the same as --datez--min-viewsCOUNT	min_views)r   r   r'   r,  r   z--max-views	max_viewsz--match-filtersFILTERmatch_filtera)  Generic video filter. Any "OUTPUT TEMPLATE" field can be compared with a number or a string using the operators defined in "Filtering Formats". You can also simply specify a field to match if the field is present, use "!field" to check if the field is not present, and "&" to check multiple conditions. Use a "\" to escape "&" or quotes if needed. If used multiple times, the filter matches if at least one of the conditions is met. E.g. --match-filters !is_live --match-filters "like_count>?100 & description~='(?i)\bcats \& dogs\b'" matches only videos that are not live OR those that have a like count more than 100 (or the like field is not available) and also has a description that contains the phrase "cats & dogs" (caseless). Use "--match-filters -" to interactively ask whether to download each video)r   r   r-  r   z--no-match-filtersz(Do not use any --match-filters (default)z--break-match-filtersbreaking_match_filterzQSame as "--match-filters" but stops the download process when a video is rejectedz--no-break-match-filtersz.Do not use any --break-match-filters (default)z--no-playlist
noplaylistzDDownload only the video, if the URL refers to a video and a playlistz--yes-playlistzBDownload the playlist, if the URL refers to a video and a playlistz--age-limitYEARS	age_limitz/Download only videos suitable for the given agez--download-archiveFILEdownload_archivezbDownload only videos not listed in the archive file. Record the IDs of all downloaded videos in itz--no-download-archivez!Do not use archive file (default)z--max-downloadsmax_downloadsz$Abort after downloading NUMBER files)r   r   r,  r'   r   z--break-on-existingbreak_on_existingzuStop the download process when encountering a file that is in the archive supplied with the --download-archive optionz--no-break-on-existingzZDo not stop the download process when encountering a file that is in the archive (default)z--break-on-rejectbreak_on_rejectz--break-per-inputbreak_per_urlziAlters --max-downloads, --break-on-existing, --break-match-filters, and autonumber to reset per input URLz--no-break-per-inputzL--break-on-existing and similar options terminates the entire download queuez--skip-playlist-after-errorsNskip_playlist_after_errorszDNumber of allowed failures until the rest of the playlist is skippedz--include-adsinclude_adsz--no-include-adszAuthentication Optionsz-uz
--usernameusernameUSERNAMEzLogin with this account IDz-pz
--passwordpasswordPASSWORDzKAccount password. If this option is left out, yt-dlp will ask interactivelyz-2z--twofactor	twofactor	TWOFACTORzTwo-factor authentication codez-nz--netrcusenetrczUse .netrc authentication dataz--netrc-locationnetrc_locationziLocation of .netrc authentication data; either the path or its containing directory. Defaults to ~/.netrcz--netrc-cmd	netrc_cmd	NETRC_CMDz;Command to execute to get the credentials for an extractor.z--video-passwordvideopasswordzVideo-specific passwordz--ap-msoap_msoMSOzlAdobe Pass multiple-system operator (TV provider) identifier, use --ap-list-mso for a list of available MSOsz--ap-usernameap_usernamez&Multiple-system operator account loginz--ap-passwordap_passwordzdMultiple-system operator account password. If this option is left out, yt-dlp will ask interactivelyz--ap-list-msoap_list_msoz,List all supported multiple-system operatorsz--client-certificateclient_certificateCERTFILEzJPath to client certificate file in PEM format. May include the private keyz--client-certificate-keyclient_certificate_keyKEYFILEz/Path to private key file for client certificatez--client-certificate-passwordclient_certificate_passwordzPassword for client certificate private key, if encrypted. If not provided, and the key is encrypted, yt-dlp will ask interactivelyzVideo Format Optionsr   z--formatr7  FORMATz:Video format code, see "FORMAT SELECTION" for more details)r-  r   r   r'   r   r   z--format-sort	SORTORDERformat_sortzLSort the formats by the fields given, see "Sorting Formats" for more detailsz--format-sort-forcez	--S-forceformat_sort_forcez}Force user specified sort order to have precedence over all fields, see "Sorting Formats" for more details (Alias: --S-force)z--no-format-sort-forcezHSome fields have precedence over the user specified sort order (default)z--video-multistreamsallow_multiple_video_streamsz<Allow multiple video streams to be merged into a single filez--no-video-multistreamszBOnly one video stream is downloaded for each output file (default)z--audio-multistreamsallow_multiple_audio_streamsz<Allow multiple audio streams to be merged into a single filez--no-audio-multistreamszBOnly one audio stream is downloaded for each output file (default)z--all-formatsrd   z--prefer-free-formatsprefer_free_formatszPrefer video formats with free containers over non-free ones of the same quality. Use with "-S ext" to strictly prefer free containers irrespective of qualityz--no-prefer-free-formatsz>Don't give any special preference to free containers (default)z--check-formatsselectedcheck_formatszMMake sure formats are selected only from those that are actually downloadable)r-  rI  r   r'   r   z--check-all-formatsz<Check all formats for whether they are actually downloadablez--no-check-formatsz7Do not check that the formats are actually downloadablez-Fz--list-formatslistformatszKList available formats of each video. Simulate unless --no-simulate is usedz--list-formats-as-tablelistformats_tablez--list-formats-oldz--no-list-formats-as-tabler   merge_output_formatzContainers that may be used when merging formats, separated by "/", e.g. "mp4/mkv". Ignored if no merge is required. (currently supported: r  z--allow-unplayable-formatsallow_unplayable_formatsz--no-allow-unplayable-formatszSubtitle Optionsz--write-subsz--write-srtwritesubtitleszWrite subtitle filez--no-write-subsz--no-write-srtz$Do not write subtitle file (default)z--write-auto-subsz--write-automatic-subswriteautomaticsubzKWrite automatically generated subtitle file (Alias: --write-automatic-subs)z--no-write-auto-subsz--no-write-automatic-subszRDo not write auto-generated subtitles (default) (Alias: --no-write-automatic-subs)z
--all-subsallsubtitlesz--list-subslistsubtitleszMList available subtitles of each video. Simulate unless --no-simulate is usedz--sub-formatsubtitlesformatbestzZSubtitle format; accepts formats preference separated by "/", e.g. "srt" or "ass/srt/best"z--sub-langsz--srt-langssubtitleslangsLANGSay  Languages of the subtitles to download (can be regex) or "all" separated by commas, e.g. --sub-langs "en.*,ja" (where "en.*" is a regex pattern that matches "en" followed by 0 or more of any character). You can prefix the language code with a "-" to exclude it from the requested languages, e.g. --sub-langs all,-live_chat. Use --list-subs for a list of available language tagszDownload Optionsz-Nz--concurrent-fragmentsconcurrent_fragment_downloadszjNumber of fragments of a dash/hlsnative video that should be downloaded concurrently (default is %default)z-rz--limit-ratez--rate-limit	ratelimitRATEz;Maximum download rate in bytes per second, e.g. 50K or 4.2Mz--throttled-ratethrottledratelimitzyMinimum download rate in bytes per second below which throttling is assumed and the video data is re-extracted, e.g. 100Kz-Rz	--retriesretriesRETRIES
   z6Number of retries (default is %default), or "infinite"z--file-access-retriesfile_access_retries   zRNumber of times to retry on file access error (default is %default), or "infinite"z--fragment-retriesfragment_retriesz_Number of retries for a fragment (default is %default), or "infinite" (DASH, hlsnative and ISM)z--retry-sleepretry_sleepz[TYPE:]EXPRz#http|fragment|file_access|extractorhttp)r  r!  a  Time to sleep between retries in seconds (optionally) prefixed by the type of retry (http (default), fragment, file_access, extractor) to apply the sleep to. EXPR can be a number, linear=START[:END[:STEP=1]] or exp=START[:END[:BASE=2]]. This option can be used multiple times to set the sleep for the different retry types, e.g. --retry-sleep linear=1::2 --retry-sleep fragment:exp=1:20z--skip-unavailable-fragmentsz#--no-abort-on-unavailable-fragmentsskip_unavailable_fragmentszwSkip unavailable fragments for DASH, hlsnative and ISM downloads (default) (Alias: --no-abort-on-unavailable-fragments)z --abort-on-unavailable-fragmentsz--no-skip-unavailable-fragmentszTAbort download if a fragment is unavailable (Alias: --no-skip-unavailable-fragments)z--keep-fragmentskeep_fragmentsz?Keep downloaded fragments on disk after downloading is finishedz--no-keep-fragmentszCDelete downloaded fragments after downloading is finished (default)z--buffer-size
buffersize1024z?Size of download buffer, e.g. 1024 or 16K (default is %default)z--resize-buffernoresizebufferzYThe buffer size is automatically resized from an initial value of --buffer-size (default)z--no-resize-bufferz+Do not automatically adjust the buffer sizez--http-chunk-sizehttp_chunk_sizezSize of a chunk for chunk-based HTTP downloading, e.g. 10485760 or 10M (default is disabled). May be useful for bypassing bandwidth throttling imposed by a webserver (experimental)z--testtestz--playlist-reverseplaylist_reversez--no-playlist-reversez--playlist-randomplaylist_randomz(Download playlist videos in random orderz--lazy-playlistlazy_playlistzwProcess entries in the playlist as they are received. This disables n_entries, --playlist-random and --playlist-reversez--no-lazy-playlistzQProcess videos in the playlist only after the entire playlist is parsed (default)z--xattr-set-filesizexattr_set_filesizez9Set file xattribute ytdl.filesize with expected file sizez--hls-prefer-nativehls_prefer_native)r   r-  r'   r   z--hls-prefer-ffmpegz--hls-use-mpegtshls_use_mpegtszUse the mpegts container for HLS videos; allowing some players to play the video while downloading, and reducing the chance of file corruption if download is interrupted. This is enabled by default for live streamsz--no-hls-use-mpegtszaDo not use the mpegts container for HLS videos. This is default when not downloading live streamsz--download-sectionsdownload_rangesa  Download only chapters that match the regular expression. A "*" prefix denotes time-range instead of chapter. Negative timestamps are calculated from the end. "*from-url" can be used to download between the "start_time" and "end_time" extracted from the URL. Needs ffmpeg. This option can be used multiple times to download multiple sections, e.g. --download-sections "*10:15-inf" --download-sections "intro"z--downloaderz--external-downloaderexternal_downloaderz[PROTO:]NAMEz http|ftp|m3u8|dash|rtsp|rtmp|mmszName or path of the external downloader to use (optionally) prefixed by the protocols (http, ftp, m3u8, dash, rstp, rtmp, mms) to use it for. Currently supports native, a  . You can use this option multiple times to set different downloaders for different protocols. E.g. --downloader aria2c --downloader "dash,m3u8:native" will use aria2c for http/ftp downloads, and the native downloader for dash/m3u8 downloads (Alias: --external-downloader)z--downloader-argsz--external-downloader-argsz	NAME:ARGSexternal_downloader_argszffmpeg_[io]\d*|{}r+  ab  Give these arguments to the external downloader. Specify the downloader name and the arguments separated by a colon ":". For ffmpeg, arguments can be passed to different positions using the same syntax as --postprocessor-args. You can use this option multiple times to give different arguments to different downloaders (Alias: --external-downloader-args)Workaroundsz
--encodingencodingENCODINGz+Force the specified encoding (experimental)z--legacy-server-connectlegacy_server_connectz^Explicitly allow HTTPS connection to servers that do not support RFC 5746 secure renegotiationz--no-check-certificatesno_check_certificatez%Suppress HTTPS certificate validationz--prefer-insecurez--prefer-unsecureprefer_insecurezlUse an unencrypted connection to retrieve information about the video (Currently supported only for YouTube)z--user-agentUA
user_agentz	--refererrefererz--add-headerszFIELD:VALUEheadersr"  zlSpecify a custom HTTP header and its value, separated by a colon ":". You can use this option multiple timesz--bidi-workaroundbidi_workaroundzhWork around terminals that lack bidirectional text support. Requires bidiv or fribidi executable in PATHr   sleep_interval_requestszBNumber of seconds to sleep between requests during data extraction)r   r   r,  r   r   z--min-sleep-intervalsleep_intervalzNumber of seconds to sleep before each download. This is the minimum time to sleep when used along with --max-sleep-interval (Alias: --min-sleep-interval)r   max_sleep_intervalzTMaximum number of seconds to sleep. Can only be used along with --min-sleep-intervalr   sleep_interval_subtitlesz8Number of seconds to sleep before each subtitle downloadz Verbosity and Simulation Optionsz-qz--quietquietzDActivate quiet mode. If used with --verbose, print the log to stderrz
--no-quietz Deactivate quiet mode. (Default)z--no-warningsno_warningszIgnore warningsz-sz
--simulatesimulatez;Do not download the video and do not write anything to diskz--no-simulatez<Download the video even if printing/listing options are usedz--ignore-no-formats-errorignore_no_formats_errorzIgnore "No video formats" error. Useful for extracting metadata even if the videos are not actually available for download (experimental)z--no-ignore-no-formats-errorzBThrow error when no downloadable video formats are found (default)z--skip-downloadz--no-downloadskip_downloadzLDo not download the video but write all related files (Alias: --no-download)z[WHEN:]TEMPLATE
forceprint)r   r   videor   aK  Field name or output template to print to screen, optionally prefixed with when to print it, separated by a ":". Supported values of "WHEN" are the same as that of --use-postprocessor (default: video). Implies --quiet. Implies --simulate unless --no-simulate or later stages of WHEN are used. This option can be used multiple timesz[WHEN:]TEMPLATE FILEprint_to_file)r   r   r5  zAppend given template to the file. The values of WHEN and TEMPLATE are the same as that of --print. FILE uses the same syntax as the output template. This option can be used multiple timesz-gz	--get-urlgeturlz-ez--get-titlegettitlez--get-idgetidz--get-thumbnailgetthumbnailz--get-descriptiongetdescriptionz--get-durationgetdurationz--get-filenamegetfilenamez--get-format	getformatz-jz--dump-jsondumpjsonzQuiet, but print JSON information for each video. Simulate unless --no-simulate is used. See "OUTPUT TEMPLATE" for a description of available keysz-Jz--dump-single-jsondump_single_jsonzQuiet, but print JSON information for each URL or infojson passed. Simulate unless --no-simulate is used. If the URL refers to a playlist, the whole playlist information is dumped in a single linez--print-json
print_jsonz--force-write-archivez--force-write-download-archivez--force-download-archiveforce_write_download_archivezForce download archive entries to be written as far as no errors occur, even if -s or another simulation option is used (Alias: --force-download-archive)z	--newlineprogress_with_newlinez Output progress bar as new linesz--no-progress
noprogresszDo not print progress barz
--progressz(Show progress bar, even if in quiet modez--console-titleconsoletitlez$Display progress in console titlebarz--progress-templatez[TYPES:]TEMPLATEprogress_templatez(download|postprocess)(-title)?downloadau  Template for progress outputs, optionally prefixed with one of "download:" (default), "download-title:" (the console title), "postprocess:",  or "postprocess-title:". The video's fields are accessible under the "info" key and the progress attributes are accessible under "progress" key. E.g. --console-title --progress-template "download-title:%(info.id)s-%(progress.eta)s"z--progress-deltaprogress_deltaz)Time between progress output (default: 0))r   r-  r   r,  r'   r   z-vz	--verboserV   z#Print various debugging informationz--dump-pagesz--dump-intermediate-pagesdump_intermediate_pageszLPrint downloaded pages encoded using base64 to debug problems (very verbose)z--write-pageswrite_pageszWWrite downloaded intermediary pages to files in the current directory to debug problemsz--load-pages
load_pagesz--youtube-print-sig-codeyoutube_print_sig_codez--print-trafficz--dump-headersdebug_printtrafficz"Display sent and read HTTP trafficz-Cz--call-home	call_homez--no-call-homezFilesystem Optionsz-az--batch-file	batchfilezFile containing URLs to download ("-" for stdin), one URL per line. Lines starting with "#", ";" or "]" are considered as comments and ignoredz--no-batch-filez*Do not read URLs from batch file (default)z--iduseid)r'   r-  r   r   z-Pz--pathsz[TYPES:]PATHr,   zhome|temp|{}rN   a  The paths where the files should be downloaded. Specify the type of file and the path separated by a colon ":". All the same TYPES as --output are supported. Additionally, you can also provide "home" (default) and "temp" paths. All intermediary files are first downloaded to the temp path and then the final files are moved over to the home path after download is finished. This option is ignored if --output is an absolute pathz-oz--outputouttmplz;Output filename template; see "OUTPUT TEMPLATE" for detailsz--output-na-placeholderouttmpl_na_placeholderTEXTNAzDPlaceholder for unavailable fields in --output (default: "%default")z--autonumber-sizeautonumber_size)r   r   r,  r   z--autonumber-startautonumber_startz--restrict-filenamesrestrictfilenameszRRestrict filenames to only ASCII characters, and avoid "&" and spaces in filenamesz--no-restrict-filenamesz?Allow Unicode characters, "&" and spaces in filenames (default)z--windows-filenameswindowsfilenamesz(Force filenames to be Windows-compatiblez--no-windows-filenamesz!Sanitize filenames only minimallyz--trim-filenamesz--trim-file-namesLENGTHtrim_file_namezULimit the filename length (excluding extension) to the specified number of charactersz-wz--no-overwrites
overwriteszDo not overwrite any filesz--force-overwritesz--yes-overwriteszJOverwrite all video and metadata files. This option includes --no-continuez--no-force-overwriteszADo not overwrite the video, but overwrite related files (default)z-cz
--continuecontinue_dlz5Resume partially downloaded files/fragments (default)z--no-continuezpDo not resume partially downloaded fragments. If the file is not fragmented, restart download of the entire filez--partnopartzFUse .part files instead of writing directly into output file (default)z	--no-partz8Do not use .part files - write directly into output filez--mtime
updatetimezHUse the Last-modified header to set the file modification time (default)z
--no-mtimezEDo not use the Last-modified header to set the file modification timez--write-descriptionwritedescriptionz.Write video description to a .description filez--no-write-descriptionz(Do not write video description (default)z--write-info-jsonwriteinfojsonzQWrite video metadata to a .info.json file (this may contain personal information)z--no-write-info-jsonz%Do not write video metadata (default)z--write-annotationswriteannotationsz--no-write-annotationsz--write-playlist-metafilesallow_playlist_fileszzWrite playlist metadata in addition to the video metadata when using --write-info-json, --write-description etc. (default)z--no-write-playlist-metafileszUDo not write playlist metadata when using --write-info-json, --write-description etc.z--clean-info-jsonz--clean-infojsonclean_infojsonzKRemove some internal metadata such as filenames from the infojson (default)z--no-clean-info-jsonz--no-clean-infojsonz Write all fields to the infojsonz--write-commentsz--get-commentsgetcommentszRetrieve video comments to be placed in the infojson. The comments are fetched even without this option if the extraction is known to be quick (Alias: --get-comments)z--no-write-commentsz--no-get-commentszdDo not retrieve video comments unless the extraction is known to be quick (Alias: --no-get-comments)z--load-info-jsonz--load-infoload_info_filenamezXJSON file containing the video information (created with the "--write-info-json" option)z	--cookies
cookiefilezCNetscape formatted file to read cookies from and dump cookie jar inz--no-cookiesz/Do not read/dump cookies from/to file (default))r-  rI  r   r   r   z--cookies-from-browsercookiesfrombrowserz(BROWSER[+KEYRING][:PROFILE][::CONTAINER]zPThe name of the browser to load cookies from. Currently supported browsers are: aV  . Optionally, the KEYRING used for decrypting Chromium cookies on Linux, the name/path of the PROFILE to load cookies from, and the CONTAINER name (if Firefox) ("none" for no container) can be given with their respective separators. By default, all containers of the most recently accessed profile are used. Currently supported keyrings are: z--no-cookies-from-browserz*Do not load cookies from browser (default)z--cache-dircachedirDIRzLocation in the filesystem where yt-dlp can store some downloaded information (such as client ids and signatures) permanently. By default ${XDG_CACHE_HOME}/yt-dlpz--no-cache-dirzDisable filesystem cachingz--rm-cache-dirrm_cachedirz!Delete all filesystem cache fileszThumbnail Optionsz--write-thumbnailwritethumbnailc                     t        |j                  | j                  t        |j                  | j                        xs d      S r   )r   r   r   r   )r   rx   __rf   s       r.   r  zcreate_parser.<locals>.<lambda>&  s/    wMM6;;v{{(K(St0U r0   zWrite thumbnail image to disk)r-  r   r'   r*  r   z--no-write-thumbnailz.Do not write thumbnail image to disk (default)z--write-all-thumbnailsz)Write all thumbnail image formats to diskz--list-thumbnailslist_thumbnailszNList available thumbnails of each video. Simulate unless --no-simulate is usedzInternet Shortcut Optionsz--write-link	writelinkzWrite an internet shortcut file, depending on the current platform (.url, .webloc or .desktop). The URL may be cached by the OSz--write-url-linkwriteurllinkzTWrite a .url Windows internet shortcut. The OS caches the URL based on the file pathz--write-webloc-linkwritewebloclinkz'Write a .webloc macOS internet shortcutz--write-desktop-linkwritedesktoplinkz(Write a .desktop Linux internet shortcutzPost-Processing Optionsr   z--extract-audioextractaudiozEConvert video files to audio-only files (requires ffmpeg and ffprobe)r   audioformatzVFormat to convert the audio to when -x is used. (currently supported: best (default), zG). You can specify multiple rules using similar syntax as --remux-videoz--audio-qualityQUALITYaudioqualityr   zSpecify ffmpeg audio quality to use when converting the audio with -x. Insert a value between 0 (best) and 10 (worst) for VBR or a specific bitrate like 128K (default %default)r   
remuxvideozJRemux the video into another container if necessary (currently supported: z). If the target container does not support the video/audio codec, remuxing will fail. You can specify multiple rules; e.g. "aac>m4a/mov>mp4/mkv" will remux aac to m4a, mov to mp4 and anything else to mkvz--recode-videorecodevideoztRe-encode the video into another format if necessary. The syntax and supported formats are the same as --remux-videoz--postprocessor-argsz--ppapostprocessor_argsz\w+(?:\+\w+)?zdefault-compat)r  r!  r  r"  a  Give these arguments to the postprocessors. Specify the postprocessor/executable name and the arguments separated by a colon ":" to give the argument to the specified postprocessor/executable. Supported PP are: Merger, ModifyChapters, SplitChapters, ExtractAudio, VideoRemuxer, VideoConvertor, Metadata, EmbedSubtitle, EmbedThumbnail, SubtitlesConvertor, ThumbnailsConvertor, FixupStretched, FixupM4a, FixupM3u8, FixupTimestamp and FixupDuration. The supported executables are: AtomicParsley, FFmpeg and FFprobe. You can also specify "PP+EXE:ARGS" to give the arguments to the specified executable only when being used by the specified postprocessor. Additionally, for ffmpeg/ffprobe, "_i"/"_o" can be appended to the prefix optionally followed by a number to pass the argument before the specified input/output file, e.g. --ppa "Merger+ffmpeg_i1:-v quiet". You can use this option multiple times to give different arguments to different postprocessors. (Alias: --ppa)z-kz--keep-video	keepvideoz>Keep the intermediate video file on disk after post-processingz--no-keep-videozBDelete the intermediate video file after post-processing (default)z--post-overwritesnopostoverwritesz(Overwrite post-processed files (default)z--no-post-overwritesz%Do not overwrite post-processed filesz--embed-subsembedsubtitlesz@Embed subtitles in the video (only for mp4, webm and mkv videos)z--no-embed-subsz Do not embed subtitles (default)z--embed-thumbnailembedthumbnailz)Embed thumbnail in the video as cover artz--no-embed-thumbnailz Do not embed thumbnail (default)z--embed-metadataz--add-metadataaddmetadatazEmbed metadata to the video file. Also embeds chapters/infojson if present unless --no-embed-chapters/--no-embed-info-json are used (Alias: --add-metadata)z--no-embed-metadataz--no-add-metadataz@Do not add metadata to file (default) (Alias: --no-add-metadata)z--embed-chaptersz--add-chaptersaddchaptersz=Add chapter markers to the video file (Alias: --add-chapters)z--no-embed-chaptersz--no-add-chaptersz?Do not add chapter markers (default) (Alias: --no-add-chapters)z--embed-info-jsonembed_infojsonz:Embed the infojson as an attachment to mkv/mka video filesz--no-embed-info-jsonz<Do not embed the infojson as an attachment to the video filez--metadata-from-titlemetafromtitlez[WHEN:]FROM:TOparse_metadatapre_processzParse additional metadata like title/artist from other fields; see "MODIFYING METADATA" for details. Supported values of "WHEN" are the same as that of --use-postprocessor (default: pre_process)z[WHEN:]FIELDS REGEX REPLACE)r   r   r5  zReplace text in a metadata field using the given regex. This option can be used multiple times. Supported values of "WHEN" are the same as that of --use-postprocessor (default: pre_process)z--xattrsz--xattrxattrszOWrite metadata to the video file's xattrs (using Dublin Core and XDG standards)z--concat-playlistPOLICYconcat_playlistmulti_video)r  alwaysri  ar  Concatenate videos in a playlist. One of "never", "always", or "multi_video" (default; only when the videos form a single show). All the video files must have the same codecs and number of streams to be concatenable. The "pl_video:" prefix can be used with "--paths" and "--output" to set the output filename for the concatenated files. See "OUTPUT TEMPLATE" for details)r   r   r'   choicesr   z--fixupfixup)r  ignorewarndetect_or_warnforcezAutomatically correct known faults of the file. One of never (do nothing), warn (only emit a warning), detect_or_warn (the default; fix the file if we can, warn otherwise), force (try fixing even if the file already exists)z--prefer-avconvz--no-prefer-ffmpegprefer_ffmpegz--prefer-ffmpegz--no-prefer-avconvz--ffmpeg-locationz--avconv-locationffmpeg_locationzXLocation of the ffmpeg binary; either the path to the binary or its containing directoryz
[WHEN:]CMDexec_cmd
after_movea  Execute a command, optionally prefixed with when to execute it, separated by a ":". Supported values of "WHEN" are the same as that of --use-postprocessor (default: after_move). The same syntax as the output template can be used to pass any field as arguments to the command. If no fields are passed, %(filepath,_filename|)q is appended to the end of the command. This option can be used multiple timesz	--no-execz$Remove any previously defined --execz--exec-before-downloadCMDexec_before_dl_cmd)r   r-  r   r   z--no-exec-before-downloadz--convert-subsz--convert-subz--convert-subtitlesconvertsubtitlesz>Convert the subtitles to another format (currently supported: zY). Use "--convert-subs none" to disable conversion (default) (Alias: --convert-subtitles)z--convert-thumbnailsconvertthumbnailsz?Convert the thumbnails to another format (currently supported: z). You can specify multiple rules using similar syntax as "--remux-video". Use "--convert-thumbnails none" to disable conversion (default)z--split-chaptersz--split-trackssplit_chapterszSplit video into multiple files based on internal chapters. The "chapter:" prefix can be used with "--paths" and "--output" to set the output filename for the split files. See "OUTPUT TEMPLATE" for detailsz--no-split-chaptersz--no-split-tracksz.Do not split video based on chapters (default)z--remove-chaptersremove_chapterszRemove chapters whose title matches the given regular expression. The syntax is the same as --download-sections. This option can be used multiple timesz--no-remove-chaptersz2Do not remove any chapters from the file (default)z--force-keyframes-at-cutsforce_keyframes_at_cutszForce keyframes at cuts when downloading/splitting/removing sections. This is slow due to needing a re-encode, but the resulting video may have fewer artifacts around the cutsz--no-force-keyframes-at-cutszKDo not force keyframes around the chapters when cutting/splitting (default)rO   c                 \    g d |r|j                  d      ng D        dt        | d      fS )Nc              3   @   K   | ]  }|j                  d d        yw=r   Nr5   )rZ   items     r.   r\   z2create_parser.<locals>.<lambda>.<locals>.<genexpr>,  s     	I$**S!
	Is   ;r'  PP)r5   r   )r'  r  s     r.   r  zcreate_parser.<locals>.<lambda>+  s6     6(	IC#))C.R	I6(	
3%&6( r0   z--use-postprocessorzNAME[:ARGS]add_postprocessorsc                 @    t         | j                  dd             S )Nr  r   r  r5   )r  _postprocessor_opts_parsers    r.   r  zcreate_parser.<locals>.<lambda>4  s    4(BCIIcSTDU(V#W r0   )r   r  a  The (case-sensitive) name of plugin postprocessors to be enabled, and (optionally) arguments to be passed to it, separated by a colon ":". ARGS are a semicolon ";" delimited list of NAME=VALUE. The "when" argument determines when the postprocessor is invoked. It can be one of "pre_process" (after video extraction), "after_filter" (after video passes filter), "video" (after --format; before --print/--output), "before_dl" (before each video download), "post_process" (after each video download; default), "after_move" (after moving the video file to its final location), "after_video" (after downloading and processing all formats of a video), or "playlist" (at end of playlist). This option can be used multiple times to add different postprocessorszSponsorBlock OptionszMake chapter entries for, or remove various segments (sponsor, introductions, etc.) from downloaded YouTube videos using the SponsorBlock API (https://sponsor.ajay.app))r   z--sponsorblock-markCATSsponsorblock_markz^SponsorBlock categories to create chapters for, separated by commas. Available categories are z, all and default (=all). You can prefix the category with a "-" to exclude it. See [1] for descriptions of the categories. E.g. --sponsorblock-mark all,-preview [1] https://wiki.sponsor.ajay.app/w/Segment_Categories)r   r   r'   r-  r,  r*  r.  r   z--sponsorblock-removesponsorblock_removez-fillera  SponsorBlock categories to be removed from the video file, separated by commas. If a category is present in both mark and remove, remove takes precedence. The syntax and available categories are the same as for --sponsorblock-mark except that "default" refers to "all,-filler" and z are not availablez--sponsorblock-chapter-titleTEMPLATEsponsorblock_chapter_titlezAn output template for the title of the SponsorBlock chapters created by --sponsorblock-mark. The only available fields are start_time, end_time, category, categories, name, category_names. Defaults to "%default")r   r'   r   r   z--no-sponsorblockno_sponsorblockz:Disable both --sponsorblock-mark and --sponsorblock-removez--sponsorblock-apizhttps://sponsor.ajay.appsponsorblock_apiz/SponsorBlock API location, defaults to %defaultz--sponskrub	sponskrubz--no-sponskrubz--sponskrub-cutsponskrub_cutz--no-sponskrub-cutz--sponskrub-forcesponskrub_forcez--no-sponskrub-forcez--sponskrub-locationsponskrub_pathz--sponskrub-argssponskrub_argsARGSzExtractor Optionsz--extractor-retriesextractor_retrieszQNumber of retries for known extractor errors (default is %default), or "infinite"z--allow-dynamic-mpdz--no-ignore-dynamic-mpddynamic_mpdzIProcess dynamic DASH manifests (default) (Alias: --no-ignore-dynamic-mpd)z--ignore-dynamic-mpdz--no-allow-dynamic-mpdzEDo not process dynamic DASH manifests (Alias: --no-allow-dynamic-mpd)z--hls-split-discontinuityhls_split_discontinuityzMSplit HLS playlists to different formats at discontinuities such as ad breaksz--no-hls-split-discontinuityz`Do not split HLS playlists into different formats at discontinuities such as ad breaks (default)c                     | j                         j                         j                  dd      t        j                  d|      D cg c]"  }|j                  dd      j                         $ c}fS c c}w )Nr   rx   z(?<!\\),z\,r   )rS   r  rq   r  r5   )r'  valsr  s      r.   r  zcreate_parser.<locals>.<lambda>  sf    #))+2C2C2E2M2McSV2W3588K3NZP,/E3%%'ZP 2Q  ZPs   'A1z--extractor-argszIE_KEY:ARGSextractor_argsc                 J    t        fd| j                  d      D              S )Nc              3   H   K   | ]  } |j                  d d         ywr~  r  )rZ   r   _extractor_arg_parsers     r.   r\   z2create_parser.<locals>.<lambda>.<locals>.<genexpr>  s)      (U>A%syya'89(Us   "r  r  )r  r  s    r.   r  zcreate_parser.<locals>.<lambda>  s$    4 (UEHYYs^(U $U r0   )r"  r  zPass ARGS arguments to the IE_KEY extractor. See "EXTRACTOR ARGUMENTS" for details. You can use this option multiple times to give arguments for different extractorsz--youtube-include-dash-manifestz--no-youtube-skip-dash-manifestyoutube_include_dash_manifestz--youtube-skip-dash-manifestz"--no-youtube-include-dash-manifestz--youtube-include-hls-manifestz--no-youtube-skip-hls-manifestyoutube_include_hls_manifestz--youtube-skip-hls-manifestz!--no-youtube-include-hls-manifest)z-Oz--print)z--print-to-file)z--parse-metadata)z--replace-in-metadata)z--exec)rO   ),r   rS   r  r   r`   OptionGroupstringr=  r;  r    r   r   	partitionr*   r   SUPPRESS_HELPr  r   r   floatr   sortedr	   SUPPORTED_EXTSr   r7  r   r  r/  r   r5   r   r  r   r   r   r   r
   r   r   
CATEGORIESNON_SKIPPABLE_CATEGORIESr   r:  )r  r  r0  rf   r@  rE  generalnetworkgeo	selectionauthenticationvideo_format	subtitles
downloaderworkarounds	verbosity
filesystem	thumbnaillinkpostprocsponsorblock	extractorr=  r>  r(  r  r  r?  s                         @@@@@@r.   r_   r_      sI4   KOWZdgdmdm D CFr/
< #ctTae		%6<
 $%F&&vy9K  "IR*	N2 ""6+<=Gh\,,  . -  / j='K8	JL  M =1  3 ]4E++2+<+<S+A!+D*E F==AYY~=V<WY	  [ . F  G >s  u 0>a  c "3U6  8 "3U5  7 ""?G  I G 4gE8R  	T #";U##  % xN	  P =.#	  % #5Te	  g _	  a , $O  Q =r  t >PUQ	  S >?  A "3t  v #4C  E {DT	  V m4:  < .%9  ; >3  5 ~7  3
 ##  % /%$?+$h/yy

)  + ]CE$> W  xG W!23
"@+  B0 ,3U!MM NdMwMwLx y55	  7 s$:448IIo4N3O P55  7 ""6+<=Ger	  t E48  : +T0  
 M4]	   $'|5  
 nI4D,  
 nD/?,  
 \U   

v'8
9CNN"%tU@	  B NN!$dE##  % NN9T	  V NN<y##  % NN<w##  % NN\##  % NN,##  % $$V->?Ih##  % Hd##  %  {Dt	  v 7##  % G##  % ^TQ  S ^TP  R VTf	  h \4?	  A [$?	  A k4c##  % k4c##  % ~h
Z	  \ M7  9 6x`  b "$]$=  ? ,S  U <Q  S k4c>  @ fq  s T0  2 hS$3  5 "5u;  <
  #6i  k "3U##  % /5x  z ?[  ] &)4cS  U <##  % =##  %
 ))&2JKNl)  + lZ  \ m+-  / i*e-  / vx  z +J  L j&  ( u{  } J5  7 Js  u -;  = !:Y  [ "%y>  @ '*JX  Y ''0FGLjXxI  K o{BU:,xn[	  ]
 {"5xQVH	  J  #6RWW  Y "@$K  M !#AQ  S "@$K  M !#AQ  S 85##  % "7[	  ] "#8%M  O J_d\  ^ /K  M ?F  H -Z  \ !"5t##  % :#6##  % 2Hd%%)YYvn6S6S/T%U$VVWY	  [ $"<e##  % '#=##  %
 $$V-?@I"2E"  $ +#33  5 5"5uZ  \  ;#6a  c .%##  % /5\  ^ .&i  k } 0'8D  F %%f.@AJ&,c13y  { nn&J  L !6 I  J k	2E  G "Iqa  c Bn  p M2E$?A!
M  O &(M"> G  H *,M#?c  e "2EN  P #3R  T 66N  P #3h  j "2E:  < e	  g &%##  % "4##  % #5##  % "37  9 / G  H ?`  b !,H  J  t##  %  ##  % lD:	  < m@	  B /P	  R /"NBU$?>$yy

**.))F;T;V4W*X)Y Z--  /  9"<bu$?077RYYPiPkAl8mn${{

2  4 &&v}=K:  < !"95m  o !"8%4  6 0"3{  } <##  % It##  % Ir$?(%0{   |w  y I&UQ  S 2IE,	  . 	!c  e Y'G  I
 $$V-OPIi'4S  U 7/  1 <    l*dJ  L :K  M #";UX	  Z &#<Q  S ?/5[  ] I7!78CG8L75	7 Ii&_AiITU\I]ig	i k(E##  % m*e##  % '5##  % .%##  % "2E##  % -##  % -##  % +u##  % m*eH	  J ""4ei	  k ,##  % !AC]"@%`	  b "95/  1 ,(  * <7  9 .%3  5 ")<bu$?=%
`  b '0@uVW8  : k)U2  4 3";U[  ] -f  h ,##  % "":E##  % +!,1  3 mu##	  %
 ##	  % %%f.BCJn&Y	  [ d9  ; '0F0F  H iWbu$?*11#((3ryy-J\J\J^;_2`a!
E  G j"BU$?HHSM4F4F4H%IJ$
 N  O !%vtT  W s##  % 13##  % "5ua  c !#6N  P "4d7  9  #50  2 /qsd  f <)  + 0,Y  [ <tP  R l-D  F =Q	  S 8UU  W (G  I ,W  Y <T  V "4e=  ?  #57  9 /4`  b ?4  6 "4e##  %  #5##  % $"8$O	  Q '#9d  f /"2DY	  \
  5#3/  1 ,-	  A 2=s  u M!6g  i 6R  T D|V>  @  !+U1156BT;U1V0W X1 263syy&QcJd;e1f0gi	  k #D/C9  ; Jec  e
 Z)  + -0  2
 $$V-@AI 0%U,  . #3=  ?  #358  : "3U]  _
 (CDDOO+u O  P 	OO.%c  e 	OO"3U6  8 	OO"4e7  9
 ##F,EFH.%T  V (559YYvFZFiFi?j5k4l mSS  U 9Sx	  z |T%%)YY/C/R/R%S$T Udd	  f }d D  E "6$?,+{{"	
-  /. n+uM  O ;Q  S #57  9 "4e4  6 "2EO  Q #3/  1 "2E8  : #3/  1 ,-_	  a 2=O  Q ,-L  N 2=N  P "2DI  K #3K  M ##  % Hn '7n;F};Unl	n Hn'DAnQ\]jQknl	n I(E_  a 0-2d  	f wFA  C /?##  % //4##  % 0&g  i H7:71<\1J75	7 :R3  5  %2##  % ##7t##  % /+@14%%)YYv6P6_6_/`%a$b cee	  g 2D%%)YYv6Q6`6`/a%b$c dNN	  P ,lE]	  _ 2m=  ? /d	  f %6}TXA  C #";Ux	  z &#<Z  \"( $8"5$?W

U  W( ''0F	_aL v #%
+,77<<>!E7+>
((,		.2K2K2P2P2R(S'T Ukk  
m "CE*5+!.";";"@"@"BCc.JqJqJvJvJxFyy "E9#56>
 99^DDIIKLMM_	a  c &
29U%	  ' U"3I  K e*1C>  @
 +u##  % ;##  % 5/##  % ?##  % U"3##  % "3##  % r##  % !16##  % $$V-@AI )Q`  b 8-X  Z  8=T  V #&|U\  
 &&}o  qQ$4bu$?"U

`  
b )+L"A4##  % &(L#B##  % (*J"@$##  % %'J#A##  %
 G$
G$
C 
I&
J'
J'
I&
D!
I&
K(
L)
I&
N+
H%
L)
I&Mr0   c                 R    t        dt         d       t        j                  |       S )Nr  zz._hide_login_info" is deprecated and may be removed in a future version. Use "yt_dlp.utils.Config.hide_login_info" instead)r   r   r   hide_login_info)rt   s    r.   _hide_login_infor    s.    !H: &a a b!!$''r0   )Nr$   )8r   rm   r`   os.pathr(   r  r   r   r  rb   compatr   cookiesr   r   downloader.externalr   postprocessorr   r	   r
   r   r   r   postprocessor.modify_chaptersr   updater   r   r   utilsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   ry   IndentedHelpFormatterr{   r   OptionParserr   r_   r   r0   r.   <module>r     s        	    
 % ; :  N E E     *X#vh<< ( I]C{RIX22 RIj]@7(r0   