mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
parent
a4d4769457
commit
806fd55d3b
@ -1,7 +1,9 @@
|
||||
import re
|
||||
import copy
|
||||
|
||||
from svtplay_dl.error import ServiceError
|
||||
from svtplay_dl.service.svtplay import Svtplay
|
||||
from svtplay_dl.subtitle import subtitle
|
||||
|
||||
|
||||
class Svt(Svtplay):
|
||||
@ -21,6 +23,11 @@ class Svt(Svtplay):
|
||||
|
||||
res = self.http.get("http://api.svt.se/videoplayer-api/video/{0}".format(id))
|
||||
janson = res.json()
|
||||
if "subtitleReferences" in janson:
|
||||
for i in janson["subtitleReferences"]:
|
||||
if i["format"] == "websrt" and "url" in i:
|
||||
yield subtitle(copy.copy(self.config), "wrst", i["url"], output=self.output)
|
||||
|
||||
videos = self._get_video(janson)
|
||||
for i in videos:
|
||||
yield i
|
||||
|
Loading…
Reference in New Issue
Block a user