1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

svtplay: don’t crash if we cant find url for subtitle.

fixes #511
This commit is contained in:
Johan Andersson 2017-01-02 18:32:33 +01:00
parent 544f131ae4
commit bc7ccc5918

View File

@ -48,7 +48,7 @@ class Svtplay(Service, OpenGraphThumbMixin):
if "subtitles" in janson["video"]:
for i in janson["video"]["subtitles"]:
if i["format"] == "WebSRT":
if i["format"] == "WebSRT" and "url" in i:
yield subtitle(copy.copy(self.options), "wrst", i["url"])
if "videoReferences" in janson["video"]: