mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
subtitle: only convert when its unicode
This commit is contained in:
parent
b05d5922e0
commit
79c7f82881
@ -134,6 +134,8 @@ class subtitle(object):
|
||||
data = text.group(1)
|
||||
recomp = re.compile(r'\r')
|
||||
text = bad_char.sub('-', recomp.sub('', subs)).replace('"', '"')
|
||||
if is_py2 and isinstance(text, unicode):
|
||||
return text.encode("utf-8")
|
||||
return text
|
||||
|
||||
def wrst(self, subdata):
|
||||
|
Loading…
Reference in New Issue
Block a user