1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-30 23:24:16 +01:00

Better excluding message

fixing #198
This commit is contained in:
Johan Andersson 2015-09-06 23:04:48 +02:00
parent b02b293919
commit 1e6de72d64
26 changed files with 26 additions and 0 deletions

View File

@ -17,6 +17,7 @@ class Aftonbladet(Service):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search('data-aptomaId="([-0-9a-z]+)"', data) match = re.search('data-aptomaId="([-0-9a-z]+)"', data)

View File

@ -20,6 +20,7 @@ class Bambuser(Service, OpenGraphThumbMixin):
return return
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
json_url = "http://player-c.api.bambuser.com/getVideo.json?api_key=005f64509e19a868399060af746a00aa&vid=%s" % match.group(1) json_url = "http://player-c.api.bambuser.com/getVideo.json?api_key=005f64509e19a868399060af746a00aa&vid=%s" % match.group(1)

View File

@ -17,6 +17,7 @@ class Bigbrother(Service, OpenGraphThumbMixin):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search(r'id="(bcPl[^"]+)"', data) match = re.search(r'id="(bcPl[^"]+)"', data)

View File

@ -16,6 +16,7 @@ class Dbtv(Service, OpenGraphThumbMixin):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
parse = urlparse(self.url) parse = urlparse(self.url)

View File

@ -23,6 +23,7 @@ class Disney(Service, OpenGraphThumbMixin):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search(r"Grill.burger=({.*}):", data) match = re.search(r"Grill.burger=({.*}):", data)

View File

@ -19,6 +19,7 @@ class Dr(Service, OpenGraphThumbMixin):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search(r'resource:[ ]*"([^"]*)",', data) match = re.search(r'resource:[ ]*"([^"]*)",', data)

View File

@ -20,6 +20,7 @@ class Expressen(Service):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search("xmlUrl=([^ ]+)\" ", data) match = re.search("xmlUrl=([^ ]+)\" ", data)

View File

@ -23,6 +23,7 @@ class Hbo(Service):
return return
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search("^/(.*).html", other) match = re.search("^/(.*).html", other)

View File

@ -63,6 +63,7 @@ class Kanal5(Service):
options.output = title options.output = title
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
if data["hasSubtitle"]: if data["hasSubtitle"]:

View File

@ -18,6 +18,7 @@ class Lemonwhale(Service):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search(r'video url-([^"]+)', data) match = re.search(r'video url-([^"]+)', data)

View File

@ -32,6 +32,7 @@ class Mtvnn(Service, OpenGraphThumbMixin):
options.output = title options.output = title
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
swfurl = mediagen.find("{http://search.yahoo.com/mrss/}player").attrib["url"] swfurl = mediagen.find("{http://search.yahoo.com/mrss/}player").attrib["url"]

View File

@ -32,6 +32,7 @@ class Mtvservices(Service):
sa = list(ss.iter("rendition")) sa = list(ss.iter("rendition"))
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
for i in sa: for i in sa:

View File

@ -19,6 +19,7 @@ class Nrk(Service, OpenGraphThumbMixin):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search("data-subtitlesurl = \"(/.*)\"", data) match = re.search("data-subtitlesurl = \"(/.*)\"", data)

View File

@ -17,6 +17,7 @@ class Picsearch(Service, OpenGraphThumbMixin):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
ajax_auth = re.search(r"picsearch_ajax_auth = '(\w+)'", data) ajax_auth = re.search(r"picsearch_ajax_auth = '(\w+)'", data)

View File

@ -17,6 +17,7 @@ class Qbrick(Service, OpenGraphThumbMixin):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
if re.findall(r"di.se", self.url): if re.findall(r"di.se", self.url):

View File

@ -19,6 +19,7 @@ class Radioplay(Service):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search(r"RP.vcdData = ({.*});</script>", data) match = re.search(r"RP.vcdData = ({.*});</script>", data)

View File

@ -17,6 +17,7 @@ class Ruv(Service):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search(r'"([^"]+geo.php)"', data) match = re.search(r'"([^"]+geo.php)"', data)

View File

@ -21,6 +21,7 @@ class Sr(Service, OpenGraphThumbMixin):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search(r'href="(/sida/[\.\/=a-z0-9&;\?]+playaudio=\d+)"', data) match = re.search(r'href="(/sida/[\.\/=a-z0-9&;\?]+playaudio=\d+)"', data)

View File

@ -60,6 +60,7 @@ class Svtplay(Service, OpenGraphThumbMixin):
options.output = outputfilename(data, options.output, ensure_unicode(self.get_urldata())) options.output = outputfilename(data, options.output, ensure_unicode(self.get_urldata()))
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
if data["video"]["subtitleReferences"]: if data["video"]["subtitleReferences"]:

View File

@ -87,6 +87,7 @@ class Tv4play(Service, OpenGraphThumbMixin):
options.output = title options.output = title
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
for i in sa: for i in sa:

View File

@ -48,6 +48,7 @@ class Twitch(Service):
urlp = urlparse(self.url) urlp = urlparse(self.url)
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.match(r'/(\w+)/([bcv])/(\d+)', urlp.path) match = re.match(r'/(\w+)/([bcv])/(\d+)', urlp.path)

View File

@ -29,6 +29,7 @@ class Urplay(Service, OpenGraphThumbMixin):
return return
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
data = match.group(1) data = match.group(1)

View File

@ -38,6 +38,7 @@ class Vg(Service, OpenGraphThumbMixin):
options.output = title options.output = title
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
if "hds" in jsondata["streamUrls"]: if "hds" in jsondata["streamUrls"]:

View File

@ -70,6 +70,7 @@ class Viaplay(Service, OpenGraphThumbMixin):
options.live = True options.live = True
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
if dataj["sami_path"]: if dataj["sami_path"]:

View File

@ -16,6 +16,7 @@ class Vimeo(Service, OpenGraphThumbMixin):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search('data-config-url="([^"]+)" data-fallback-url', data) match = re.search('data-config-url="([^"]+)" data-fallback-url', data)

View File

@ -17,6 +17,7 @@ class Youplay(Service, OpenGraphThumbMixin):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(options): if self.exclude(options):
yield ServiceError("Excluding video")
return return
match = re.search(r'script async defer src="(//content.youplay.se[^"]+)"', data) match = re.search(r'script async defer src="(//content.youplay.se[^"]+)"', data)