mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-23 19:55:38 +01:00
subtitle: they have css align after the timecode
This commit is contained in:
parent
b01124a4ab
commit
d713d33e67
@ -479,7 +479,9 @@ def tt_text(node, data):
|
||||
|
||||
|
||||
def strdate(datestring):
|
||||
match = re.search(r"^((\d+:\d+:\d+[\.,]*[0-9]*)?(\d+:\d+[\.,]*[0-9]*)?) --> ((\d+:\d+:\d+[\.,]*[0-9]*)?(\d+:\d+[\.,]*[0-9]*)?)$", datestring)
|
||||
match = re.search(r"^((\d+:\d+:\d+[\.,]*[0-9]*)?(\d+:\d+[\.,]*[0-9]*)?) --> ((\d+:\d+:\d+[\.,]*[0-9]*)?(\d+:\d+[\.,]*[0-9]*)?)[ ]*", datestring)
|
||||
if match and match.group(5) is None and match.group(6) is not None:
|
||||
return None
|
||||
return match
|
||||
|
||||
|
||||
|
@ -164,7 +164,7 @@ class streamSubtile(unittest.TestCase):
|
||||
subtitle(config, "wrst", "http://example.com", subfix="no"),
|
||||
]
|
||||
subs = subtitle_filter(test_subs)
|
||||
assert len(subs) == 4
|
||||
assert len(subs) == 3
|
||||
|
||||
def test_subtitleFilter3(self):
|
||||
config = setup_defaults()
|
||||
@ -200,4 +200,4 @@ class streamSubtile(unittest.TestCase):
|
||||
subtitle(config, "wrst", "http://example.com", subfix="no"),
|
||||
]
|
||||
subs = subtitle_filter(test_subs)
|
||||
assert len(subs) == 3
|
||||
assert len(subs) == 2
|
||||
|
Loading…
Reference in New Issue
Block a user