diff --git a/lib/svtplay_dl/service/bigbrother.py b/lib/svtplay_dl/service/bigbrother.py index 8ea43b2..116a48e 100644 --- a/lib/svtplay_dl/service/bigbrother.py +++ b/lib/svtplay_dl/service/bigbrother.py @@ -19,7 +19,7 @@ class Bigbrother(Service, OpenGraphThumbMixin): match = re.search(r'id="(bcPl[^"]+)"', self.get_urldata()) if not match: log.error("Can't find flash id.") - sys.exit(2) + return flashid = match.group(1) match = re.search(r'playerID" value="([^"]+)"', self.get_urldata()) diff --git a/lib/svtplay_dl/service/svtplay.py b/lib/svtplay_dl/service/svtplay.py index 93ebe12..2e2039c 100644 --- a/lib/svtplay_dl/service/svtplay.py +++ b/lib/svtplay_dl/service/svtplay.py @@ -105,7 +105,7 @@ class Svtplay(Service, OpenGraphThumbMixin): self.get_urldata()) if match is None: log.error("Couldn't retrieve episode list") - sys.exit(2) + return xml = ET.XML(get_http_data(match.group(1))) diff --git a/lib/svtplay_dl/service/tv4play.py b/lib/svtplay_dl/service/tv4play.py index da424c1..4cbb554 100644 --- a/lib/svtplay_dl/service/tv4play.py +++ b/lib/svtplay_dl/service/tv4play.py @@ -68,8 +68,8 @@ class Tv4play(Service, OpenGraphThumbMixin): if xml.find("live").text != "false": options.live = True if xml.find("drmProtected").text == "true": - log.error("DRM protected content.") - sys.exit(2) + log.error("We cant download DRM protected content from this site.") + return if options.output_auto: directory = os.path.dirname(options.output) diff --git a/lib/svtplay_dl/service/urplay.py b/lib/svtplay_dl/service/urplay.py index 09d6e94..481910a 100644 --- a/lib/svtplay_dl/service/urplay.py +++ b/lib/svtplay_dl/service/urplay.py @@ -59,7 +59,7 @@ class Urplay(Service, OpenGraphThumbMixin): self.get_urldata()) if match is None: log.error("Couldn't retrieve episode list") - sys.exit(2) + return url = "http://urplay.se%s" % match.group(1).replace("&", "&") xml = ET.XML(get_http_data(url)) diff --git a/lib/svtplay_dl/service/viaplay.py b/lib/svtplay_dl/service/viaplay.py index 2162e6c..bac9ab5 100644 --- a/lib/svtplay_dl/service/viaplay.py +++ b/lib/svtplay_dl/service/viaplay.py @@ -98,8 +98,8 @@ class Viaplay(Service, OpenGraphThumbMixin): parse = urlparse(filename) match = re.search("^(/[^/]+)/(.*)", parse.path) if not match: - log.error("Somthing wrong with rtmpparse") - sys.exit(2) + log.error("Something wrong with rtmpparse") + return filename = "%s://%s:%s%s" % (parse.scheme, parse.hostname, parse.port, match.group(1)) path = "-y %s" % match.group(2) options.other = "-W http://flvplayer.viastream.viasat.tv/flvplayer/play/swf/player.swf %s" % path @@ -113,8 +113,8 @@ class Viaplay(Service, OpenGraphThumbMixin): def find_all_episodes(self, options): format_id = re.search(r'data-format-id="(\d+)"', self.get_urldata()) if not format_id: - log.error("Can't find video info") - sys.exit(2) + log.error("Can't find video info for all episodes") + return data = get_http_data("http://playapi.mtgx.tv/v1/sections?sections=videos.one,seasons.videolist&format=%s" % format_id.group(1)) jsondata = json.loads(data) videos = jsondata["_embedded"]["sections"][1]["_embedded"]["seasons"][0]["_embedded"]["episodelist"]["_embedded"]["videos"] diff --git a/lib/svtplay_dl/service/vimeo.py b/lib/svtplay_dl/service/vimeo.py index 5331286..e8570a0 100644 --- a/lib/svtplay_dl/service/vimeo.py +++ b/lib/svtplay_dl/service/vimeo.py @@ -29,4 +29,4 @@ class Vimeo(Service, OpenGraphThumbMixin): yield HTTP(copy.copy(options), avail_quality[i]["url"], avail_quality[i]["bitrate"]) else: log.error("Can't find any streams.") - sys.exit(2) \ No newline at end of file + return \ No newline at end of file