mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-30 15:14:14 +01:00
subtitle.tt: return empty string
in some cases the xml is empty
This commit is contained in:
parent
d9209f843e
commit
14e1e6585c
@ -93,6 +93,8 @@ class subtitle:
|
||||
subdata = re.sub(' xmlns="[^"]+"', "", subs, count=1)
|
||||
tree = ET.XML(subdata)
|
||||
xml = tree.find("body").find("div")
|
||||
if not xml:
|
||||
return data
|
||||
plist = list(xml.findall("p"))
|
||||
for node in plist:
|
||||
tag = norm(node.tag)
|
||||
|
Loading…
Reference in New Issue
Block a user