mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
viaplay: yield the subs
This commit is contained in:
parent
89567e297f
commit
d1e0757dd4
@ -12,9 +12,10 @@ import json
|
||||
|
||||
from svtplay_dl.utils.urllib import urlparse
|
||||
from svtplay_dl.service import Service, OpenGraphThumbMixin
|
||||
from svtplay_dl.utils import get_http_data, subtitle_sami
|
||||
from svtplay_dl.utils import get_http_data
|
||||
from svtplay_dl.log import log
|
||||
from svtplay_dl.fetcher.rtmp import RTMP
|
||||
from svtplay_dl.subtitle import subtitle_sami
|
||||
|
||||
class Viaplay(Service, OpenGraphThumbMixin):
|
||||
supported_domains = [
|
||||
@ -66,7 +67,7 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
||||
options.live = True
|
||||
filename = xml.find("Product").find("Videos").find("Video").find("Url").text
|
||||
bitrate = xml.find("Product").find("Videos").find("Video").find("BitRate").text
|
||||
self.subtitle = xml.find("Product").find("SamiFile").text
|
||||
yield subtitle_sami(xml.find("Product").find("SamiFile").text)
|
||||
|
||||
if filename[:4] == "http":
|
||||
data = get_http_data(filename)
|
||||
@ -90,11 +91,6 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
||||
|
||||
yield RTMP(options, filename, bitrate)
|
||||
|
||||
def get_subtitle(self, options):
|
||||
if self.subtitle:
|
||||
data = get_http_data(self.subtitle)
|
||||
subtitle_sami(options, data)
|
||||
|
||||
def find_all_episodes(self, options):
|
||||
format_id = re.search(r'data-format-id="(\d+)"', self.get_urldata())
|
||||
if not format_id:
|
||||
|
Loading…
Reference in New Issue
Block a user