Skip to content

Commit

Permalink
os_vers -> os_ver
Browse files Browse the repository at this point in the history
  • Loading branch information
coletdjnz committed Mar 16, 2024
1 parent 1251268 commit e46c999
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions yt_dlp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ def _real_main(argv=None):
available_targets = ydl._get_available_impersonate_targets()

rows = [
[target.client or '-', target.version or '-', target.os or '-', target.os_vers or '-', handler]
[target.client or '-', target.version or '-', target.os or '-', target.os_ver or '-', handler]
for target, handler in available_targets
]

Expand All @@ -1012,7 +1012,7 @@ def _real_main(argv=None):
ydl._format_out(known_target.client or '-', ydl.Styles.SUPPRESS),
ydl._format_out(known_target.version or '-', ydl.Styles.SUPPRESS),
ydl._format_out(known_target.os or '-', ydl.Styles.SUPPRESS),
ydl._format_out(known_target.os_vers or '-', ydl.Styles.SUPPRESS),
ydl._format_out(known_target.os_ver or '-', ydl.Styles.SUPPRESS),
ydl._format_out(f'{known_handler} (not installed)', ydl.Styles.SUPPRESS),
])

Expand Down
10 changes: 5 additions & 5 deletions yt_dlp/networking/impersonate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ class ImpersonateTarget:
@param client: the client to impersonate
@param version: the client version to impersonate
@param os: the client OS to impersonate
@param os_vers: the client OS version to impersonate
@param os_ver: the client OS version to impersonate
Note: None is used to indicate to match any.
"""
client: str | None = None
version: str | None = None
os: str | None = None
os_vers: str | None = None
os_ver: str | None = None

def __contains__(self, target: ImpersonateTarget):
if not isinstance(target, ImpersonateTarget):
Expand All @@ -36,12 +36,12 @@ def __contains__(self, target: ImpersonateTarget):
(self.client is None or target.client is None or self.client == target.client)
and (self.version is None or target.version is None or self.version == target.version)
and (self.os is None or target.os is None or self.os == target.os)
and (self.os_vers is None or target.os_vers is None or self.os_vers == target.os_vers)
and (self.os_ver is None or target.os_ver is None or self.os_ver == target.os_ver)
)

def __str__(self):
return ':'.join(part or '' for part in (
self.client, self.version, self.os, self.os_vers)).rstrip(':')
self.client, self.version, self.os, self.os_ver)).rstrip(':')

@classmethod
def from_str(cls, target: str):
Expand All @@ -55,7 +55,7 @@ class ImpersonateRequestHandler(RequestHandler, ABC):
This provides a method for checking the validity of the impersonate extension,
which can be used in _check_extensions.
Impersonate targets consist of a client, version, os and os_vers.
Impersonate targets consist of a client, version, os and os_ver.
See the ImpersonateTarget class for more details.
The following may be defined:
Expand Down

0 comments on commit e46c999

Please sign in to comment.