diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-07-31 16:21:01 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-01 12:38:05 +0530 |
commit | dbf5416a20b8a4ff301ef6c641f516fa20a546cb (patch) | |
tree | 959c28dd0afea7a2571066765eeb744b5d0a826e /yt_dlp/extractor/common.py | |
parent | d74a58a186603670f0f8acbc07a54f6381ca267f (diff) |
[cleanup] Refactor some code
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r-- | yt_dlp/extractor/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index e767d75b5..a3ac9dfb7 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -1298,7 +1298,7 @@ class InfoExtractor(object): # JSON-LD may be malformed and thus `fatal` should be respected. # At the same time `default` may be passed that assumes `fatal=False` # for _search_regex. Let's simulate the same behavior here as well. - fatal = kwargs.get('fatal', True) if default == NO_DEFAULT else False + fatal = kwargs.get('fatal', True) if default is NO_DEFAULT else False json_ld = [] for mobj in json_ld_list: json_ld_item = self._parse_json( @@ -1522,7 +1522,7 @@ class InfoExtractor(object): 'size': {'type': 'combined', 'same_limit': True, 'field': ('filesize', 'fs_approx')}, 'ext': {'type': 'combined', 'field': ('vext', 'aext')}, 'res': {'type': 'multiple', 'field': ('height', 'width'), - 'function': lambda it: (lambda l: min(l) if l else 0)(tuple(filter(None, it)))}, + 'function': lambda it: (lambda l: min(l) if l else 0)(tuple(filter(None, it)))}, # Most of these exist only for compatibility reasons 'dimension': {'type': 'alias', 'field': 'res'}, |