1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 12:15:40 +01:00
svtplay-dl/lib/svtplay_dl/service/raw.py

19 lines
606 B
Python
Raw Normal View History

import os
import re
2019-08-25 00:40:39 +02:00
from svtplay_dl.fetcher.dash import dashparse
from svtplay_dl.fetcher.hls import hlsparse
2019-08-25 00:40:39 +02:00
from svtplay_dl.service import Service
2015-09-15 20:10:32 +02:00
class Raw(Service):
def get(self):
2019-08-25 00:27:31 +02:00
filename = os.path.basename(self.url[: self.url.rfind("/")])
self.output["title"] = filename
2015-01-28 20:57:37 +01:00
if re.search(".m3u8", self.url):
yield from hlsparse(self.config, self.http.request("get", self.url), self.url, output=self.output)
if re.search(".mpd", self.url):
yield from dashparse(self.config, self.http.request("get", self.url), self.url, output=self.output)