mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
[lynda] Remove superfluous space
This commit is contained in:
parent
ac260dd81e
commit
73a25b30ea
1 changed files with 6 additions and 6 deletions
|
@ -65,8 +65,8 @@ def _real_extract(self, url):
|
||||||
'formats': formats
|
'formats': formats
|
||||||
}
|
}
|
||||||
|
|
||||||
_TIMECODE_REGEX = r'\[(?P<timecode>\d+:\d+:\d+[\.,]\d+)\]'
|
_TIMECODE_REGEX = r'\[(?P<timecode>\d+:\d+:\d+[\.,]\d+)\]'
|
||||||
|
|
||||||
def _fix_subtitles(self, subtitles):
|
def _fix_subtitles(self, subtitles):
|
||||||
fixed_subtitles = {}
|
fixed_subtitles = {}
|
||||||
for k, v in subtitles.items():
|
for k, v in subtitles.items():
|
||||||
|
@ -75,14 +75,14 @@ def _fix_subtitles(self, subtitles):
|
||||||
continue
|
continue
|
||||||
srt = ''
|
srt = ''
|
||||||
for pos in range(0, len(subs) - 1):
|
for pos in range(0, len(subs) - 1):
|
||||||
seq_current = subs[pos]
|
seq_current = subs[pos]
|
||||||
m_current = re.match(self._TIMECODE_REGEX, seq_current['Timecode'])
|
m_current = re.match(self._TIMECODE_REGEX, seq_current['Timecode'])
|
||||||
if m_current is None:
|
if m_current is None:
|
||||||
continue
|
continue
|
||||||
seq_next = subs[pos+1]
|
seq_next = subs[pos + 1]
|
||||||
m_next = re.match(self._TIMECODE_REGEX, seq_next['Timecode'])
|
m_next = re.match(self._TIMECODE_REGEX, seq_next['Timecode'])
|
||||||
if m_next is None:
|
if m_next is None:
|
||||||
continue
|
continue
|
||||||
appear_time = m_current.group('timecode')
|
appear_time = m_current.group('timecode')
|
||||||
disappear_time = m_next.group('timecode')
|
disappear_time = m_next.group('timecode')
|
||||||
text = seq_current['Caption']
|
text = seq_current['Caption']
|
||||||
|
|
Loading…
Reference in a new issue