diff --git a/lib/svtplay_dl/fetcher/rtmp.py b/lib/svtplay_dl/fetcher/rtmp.py deleted file mode 100644 index 5abf283..0000000 --- a/lib/svtplay_dl/fetcher/rtmp.py +++ /dev/null @@ -1,46 +0,0 @@ -# ex:ts=4:sw=4:sts=4:et -# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- -from __future__ import absolute_import -import subprocess -import shlex - -from svtplay_dl.log import log -from svtplay_dl.fetcher import VideoRetriever -from svtplay_dl.utils.output import output, formatname - - -class RTMP(VideoRetriever): - @property - def name(self): - return "rtmp" - - def download(self): - """ Get the stream from RTMP """ - self.output_extention = "flv" - args = [] - if self.config.get("live"): - args.append("-v") - - if self.config.get("resume"): - args.append("-e") - - file_d = output(self.output, self.config, "flv", False) - if file_d is None: - return - args += ["-o", formatname(self.output, self.config, "flv")] - if self.config.get("silent"): - args.append("-q") - if self.kwargs.get("other"): - args += shlex.split(self.kwargs.pop("other")) - - if self.config.get("verbose"): - args.append("-V") - - command = ["rtmpdump", "-r", self.url] + args - log.debug("Running: {0}".format(" ".join(command))) - try: - subprocess.call(command) - except OSError as e: - log.error("Could not execute rtmpdump: {0}".format(e.strerror)) - return - self.finished = True diff --git a/lib/svtplay_dl/service/dr.py b/lib/svtplay_dl/service/dr.py index 7f7fa8f..0333088 100644 --- a/lib/svtplay_dl/service/dr.py +++ b/lib/svtplay_dl/service/dr.py @@ -8,7 +8,6 @@ import copy from urllib.parse import urljoin, urlparse from svtplay_dl.service import Service, OpenGraphThumbMixin -from svtplay_dl.fetcher.rtmp import RTMP from svtplay_dl.fetcher.hls import hlsparse from svtplay_dl.fetcher.hds import hdsparse from svtplay_dl.subtitle import subtitle @@ -64,10 +63,6 @@ class Dr(Service, OpenGraphThumbMixin): streams = hlsparse(self.config, self.http.request("get", stream["Uri"]), stream["Uri"], output=self.output) for n in list(streams.keys()): yield streams[n] - if stream["Target"] == "Streaming": - self.config.set("other", "-v -y '{0}'".format(stream['Uri'].replace("rtmp://vod.dr.dk/cms/", ""))) - rtmp = "rtmp://vod.dr.dk/cms/" - yield RTMP(copy.copy(self.config), rtmp, stream['Bitrate'], output=self.output) def find_all_episodes(self, config): episodes = [] @@ -126,8 +121,3 @@ class Dr(Service, OpenGraphThumbMixin): streams = hlsparse(config, self.http.request("get", i["Uri"]), i["Uri"], output=self.output) for n in list(streams.keys()): yield streams[n] - else: - if i["Target"] == "Streaming": - config.set("other", "-y '{0}'".format(i["Uri"].replace("rtmp://vod.dr.dk/cms/", ""))) - rtmp = "rtmp://vod.dr.dk/cms/" - yield RTMP(copy.copy(config), rtmp, i["Bitrate"], output=self.output) diff --git a/lib/svtplay_dl/service/mtvnn.py b/lib/svtplay_dl/service/mtvnn.py index 7039f52..c1c235c 100644 --- a/lib/svtplay_dl/service/mtvnn.py +++ b/lib/svtplay_dl/service/mtvnn.py @@ -7,7 +7,6 @@ from urllib.parse import urlparse from svtplay_dl.service import Service, OpenGraphThumbMixin from svtplay_dl.error import ServiceError from svtplay_dl.log import log -from svtplay_dl.fetcher.rtmp import RTMP from svtplay_dl.fetcher.hls import hlsparse @@ -65,22 +64,9 @@ class Mtvnn(Service, OpenGraphThumbMixin): mrssxmlurl = match.group(1) data = self.http.request("get", mrssxmlurl).content xml = ET.XML(data) - mediagen = xml.find("channel").find("item").find("{http://search.yahoo.com/mrss/}group") title = xml.find("channel").find("item").find("title").text self.output["title"] = title - swfurl = mediagen.find("{http://search.yahoo.com/mrss/}player").attrib["url"] - other = "-W {0}".format(self.http.check_redirect(swfurl)) - - contenturl = mediagen.find("{http://search.yahoo.com/mrss/}content").attrib["url"] - content = self.http.request("get", contenturl).content - xml = ET.XML(content) - ss = xml.find("video").find("item") - sa = list(ss.iter("rendition")) - - for i in sa: - yield RTMP(self.config, i.find("src").text, i.attrib["bitrate"], other=other, output=self.output) - match = re.search("gon.viacom_config=([^;]+);", self.get_urldata()) if match: countrycode = json.loads(match.group(1))["country_code"].replace("_", "/") diff --git a/lib/svtplay_dl/service/qbrick.py b/lib/svtplay_dl/service/qbrick.py deleted file mode 100644 index 911bc4a..0000000 --- a/lib/svtplay_dl/service/qbrick.py +++ /dev/null @@ -1,52 +0,0 @@ -# ex:ts=4:sw=4:sts=4:et -# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- -from __future__ import absolute_import -import re -import copy -import xml.etree.ElementTree as ET - -from svtplay_dl.service import Service, OpenGraphThumbMixin -from svtplay_dl.error import ServiceError -from svtplay_dl.fetcher.rtmp import RTMP - - -class Qbrick(Service, OpenGraphThumbMixin): - supported_domains = ['di.seXX'] - - def get(self): - data = self.get_urldata() - - if re.findall(r"di.se", self.url): - match = re.search("src=\"(http://qstream.*)\">