mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-13 13:05:13 +00:00
@@ -95,7 +95,7 @@ TIMEZONE_NAMES = {
|
||||
# needed for sanitizing filenames in restricted mode
|
||||
ACCENT_CHARS = dict(zip('ÂÃÄÀÁÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖŐØŒÙÚÛÜŰÝÞßàáâãäåæçèéêëìíîïðñòóôõöőøœùúûüűýþÿ',
|
||||
itertools.chain('AAAAAA', ['AE'], 'CEEEEIIIIDNOOOOOOO', ['OE'], 'UUUUUY', ['TH', 'ss'],
|
||||
'aaaaaa', ['ae'], 'ceeeeiiiionooooooo', ['oe'], 'uuuuuy', ['th'], 'y')))
|
||||
'aaaaaa', ['ae'], 'ceeeeiiiionooooooo', ['oe'], 'uuuuuy', ['th'], 'y'), strict=True))
|
||||
|
||||
DATE_FORMATS = (
|
||||
'%d %B %Y',
|
||||
@@ -2402,7 +2402,6 @@ class PlaylistEntries:
|
||||
|
||||
def __init__(self, ydl, info_dict):
|
||||
self.ydl = ydl
|
||||
|
||||
# _entries must be assigned now since infodict can change during iteration
|
||||
entries = info_dict.get('entries')
|
||||
if entries is None:
|
||||
@@ -2415,7 +2414,7 @@ class PlaylistEntries:
|
||||
if self.is_incomplete:
|
||||
assert self.is_exhausted
|
||||
self._entries = [self.MissingEntry] * max(requested_entries or [0])
|
||||
for i, entry in zip(requested_entries, entries):
|
||||
for i, entry in zip(requested_entries, entries): # noqa: B905
|
||||
self._entries[i - 1] = entry
|
||||
elif isinstance(entries, (list, PagedList, LazyList)):
|
||||
self._entries = entries
|
||||
@@ -3184,7 +3183,7 @@ def render_table(header_row, data, delim=False, extra_gap=0, hide_empty=False):
|
||||
return len(remove_terminal_sequences(string).replace('\t', ''))
|
||||
|
||||
def get_max_lens(table):
|
||||
return [max(width(str(v)) for v in col) for col in zip(*table)]
|
||||
return [max(width(str(v)) for v in col) for col in zip(*table, strict=True)]
|
||||
|
||||
def filter_using_list(row, filter_array):
|
||||
return [col for take, col in itertools.zip_longest(filter_array, row, fillvalue=True) if take]
|
||||
@@ -3540,7 +3539,7 @@ def dfxp2srt(dfxp_data):
|
||||
continue
|
||||
default_style.update(style)
|
||||
|
||||
for para, index in zip(paras, itertools.count(1)):
|
||||
for para, index in zip(paras, itertools.count(1), strict=False):
|
||||
begin_time = parse_dfxp_time_expr(para.attrib.get('begin'))
|
||||
end_time = parse_dfxp_time_expr(para.attrib.get('end'))
|
||||
dur = parse_dfxp_time_expr(para.attrib.get('dur'))
|
||||
@@ -4854,7 +4853,7 @@ def scale_thumbnails_to_max_format_width(formats, thumbnails, url_width_re):
|
||||
return [
|
||||
merge_dicts(
|
||||
{'url': re.sub(url_width_re, str(max_dimensions[0]), thumbnail['url'])},
|
||||
dict(zip(_keys, max_dimensions)), thumbnail)
|
||||
dict(zip(_keys, max_dimensions, strict=True)), thumbnail)
|
||||
for thumbnail in thumbnails
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user