aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/options.py
diff options
context:
space:
mode:
authorcoletdjnz <coletdjnz@protonmail.com>2024-03-16 22:47:56 -0500
committerbashonly <bashonly@protonmail.com>2024-03-16 23:14:13 -0500
commit0b81d4d252bd065ccd352722987ea34fe17f9244 (patch)
tree7a1ac011346a006ebfcfc8310542d197e8fd169d /yt_dlp/options.py
parentf849d77ab54788446b995d256e1ee0894c4fb927 (diff)
Add new options `--impersonate` and `--list-impersonate-targets`
Authored by: coletdjnz, Grub4K, pukkandan, bashonly Co-authored-by: Simon Sawicki <contact@grub4k.xyz> Co-authored-by: pukkandan <pukkandan.ytdlp@gmail.com> Co-authored-by: bashonly <bashonly@protonmail.com>
Diffstat (limited to 'yt_dlp/options.py')
-rw-r--r--yt_dlp/options.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/yt_dlp/options.py b/yt_dlp/options.py
index f88472731..dac56dc1f 100644
--- a/yt_dlp/options.py
+++ b/yt_dlp/options.py
@@ -516,6 +516,18 @@ def create_parser():
help='Client-side IP address to bind to',
)
network.add_option(
+ '--impersonate',
+ metavar='CLIENT[:OS]', dest='impersonate', default=None,
+ help=(
+ 'Client to impersonate for requests. E.g. chrome, chrome-110, chrome:windows-10. '
+ 'Pass --impersonate="" to impersonate any client.'),
+ )
+ network.add_option(
+ '--list-impersonate-targets',
+ dest='list_impersonate_targets', default=False, action='store_true',
+ help='List available clients to impersonate.',
+ )
+ network.add_option(
'-4', '--force-ipv4',
action='store_const', const='0.0.0.0', dest='source_address',
help='Make all connections via IPv4',