mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
parent
b298e823eb
commit
c0b4d278b4
@ -104,7 +104,11 @@ class subtitle(object):
|
||||
return subs
|
||||
|
||||
def sami(self, subdata):
|
||||
tree = ET.XML(subdata.text.encode("utf8"))
|
||||
text = subdata.text
|
||||
if is_py2:
|
||||
text = text.encode("utf8")
|
||||
text = re.sub(r'&', '&', text)
|
||||
tree = ET.fromstring(text)
|
||||
subt = tree.find("Font")
|
||||
subs = ""
|
||||
n = 0
|
||||
@ -122,6 +126,7 @@ class subtitle(object):
|
||||
|
||||
if is_py2:
|
||||
subs = subs.encode('utf8')
|
||||
subs = re.sub('&', r'&', subs)
|
||||
return subs
|
||||
|
||||
def smi(self, subdata):
|
||||
|
Loading…
Reference in New Issue
Block a user