1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

remove options in argument for exclude

This commit is contained in:
Johan Andersson 2016-05-14 22:54:30 +02:00
parent c324374ba7
commit fa730a5564
28 changed files with 32 additions and 30 deletions

View File

@ -16,7 +16,7 @@ class Aftonbladet(Service):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -20,7 +20,7 @@ class Bambuser(Service, OpenGraphThumbMixin):
yield ServiceError("Can't find video id in url") yield ServiceError("Can't find video id in url")
return return
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -18,7 +18,7 @@ class Bigbrother(Service, OpenGraphThumbMixin):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

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

View File

@ -78,7 +78,7 @@ class Disney(Service, OpenGraphThumbMixin):
else: else:
self.options.output = title self.options.output = title
if self.exclude(self.options): if self.exclude():
return return
url = "http://cdnapi.kaltura.com/html5/html5lib/v1.9.7.6/mwEmbedFrame.php?&wid=%s&uiconf_id=%s&entry_id=%s&playerId=%s&forceMobileHTML5=true&urid=1.9.7.6&callback=mwi" % \ url = "http://cdnapi.kaltura.com/html5/html5lib/v1.9.7.6/mwEmbedFrame.php?&wid=%s&uiconf_id=%s&entry_id=%s&playerId=%s&forceMobileHTML5=true&urid=1.9.7.6&callback=mwi" % \

View File

@ -24,9 +24,6 @@ class Dplay(Service):
premium = False premium = False
parse = urlparse(self.url) parse = urlparse(self.url)
domain = re.search(r"(dplay\.\w\w)", parse.netloc).group(1) domain = re.search(r"(dplay\.\w\w)", parse.netloc).group(1)
if self.exclude(self.options):
yield ServiceError("Excluding video")
return
match = re.search(r"<link rel='shortlink' href='[^']+/\?p=(\d+)", data) match = re.search(r"<link rel='shortlink' href='[^']+/\?p=(\d+)", data)
if not match: if not match:
@ -66,6 +63,11 @@ class Dplay(Service):
self.options.output = os.path.join(directory, title) self.options.output = os.path.join(directory, title)
else: else:
self.options.output = title self.options.output = title
if self.exclude():
yield ServiceError("Excluding video")
return
suburl = dataj["data"][0]["subtitles_sv_srt"] suburl = dataj["data"][0]["subtitles_sv_srt"]
if len(suburl) > 0: if len(suburl) > 0:
yield subtitle(copy.copy(self.options), "raw", suburl) yield subtitle(copy.copy(self.options), "raw", suburl)

View File

@ -19,7 +19,7 @@ class Dr(Service, OpenGraphThumbMixin):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -17,7 +17,7 @@ class Expressen(Service):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -24,7 +24,7 @@ class Hbo(Service):
log.error("Something wrong with that url") log.error("Something wrong with that url")
return return
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -18,7 +18,7 @@ class Lemonwhale(Service):
vid = None vid = None
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -34,7 +34,7 @@ class Mtvnn(Service, OpenGraphThumbMixin):
else: else:
self.options.output = title self.options.output = title
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

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

View File

@ -19,7 +19,7 @@ class Nrk(Service, OpenGraphThumbMixin):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -17,7 +17,7 @@ class Picsearch(Service, OpenGraphThumbMixin):
supported_domains = ['dn.se', 'mobil.dn.se', 'di.se', 'csp.picsearch.com', 'csp.screen9.com'] supported_domains = ['dn.se', 'mobil.dn.se', 'di.se', 'csp.picsearch.com', 'csp.screen9.com']
def get(self): def get(self):
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -17,7 +17,7 @@ class Qbrick(Service, OpenGraphThumbMixin):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -19,7 +19,7 @@ class Radioplay(Service):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -10,7 +10,7 @@ class Raw(Service):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
return return
extention = False extention = False

View File

@ -17,7 +17,7 @@ class Ruv(Service):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -17,7 +17,7 @@ class Solidtango(Service):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return
match = re.search('src="(http://mm-resource-service.herokuapp.com[^"]*)"', data) match = re.search('src="(http://mm-resource-service.herokuapp.com[^"]*)"', data)

View File

@ -21,7 +21,7 @@ class Sr(Service, OpenGraphThumbMixin):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -60,7 +60,7 @@ class Svtplay(Service, OpenGraphThumbMixin):
self.options.service = "svtplay" self.options.service = "svtplay"
self.options.output = self.outputfilename(dataj, self.options.output, ensure_unicode(self.get_urldata())) self.options.output = self.outputfilename(dataj, self.options.output, ensure_unicode(self.get_urldata()))
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -81,7 +81,7 @@ class Tv4play(Service, OpenGraphThumbMixin):
else: else:
self.options.output = title self.options.output = title
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -47,7 +47,7 @@ class Twitch(Service):
def get(self): def get(self):
urlp = urlparse(self.url) urlp = urlparse(self.url)
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -25,7 +25,7 @@ class Urplay(Service, OpenGraphThumbMixin):
yield ServiceError("Can't find json info") yield ServiceError("Can't find json info")
return return
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -38,7 +38,7 @@ class Vg(Service, OpenGraphThumbMixin):
else: else:
self.options.output = title self.options.output = title
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

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

View File

@ -16,7 +16,7 @@ class Vimeo(Service, OpenGraphThumbMixin):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return

View File

@ -17,7 +17,7 @@ class Youplay(Service, OpenGraphThumbMixin):
def get(self): def get(self):
data = self.get_urldata() data = self.get_urldata()
if self.exclude(self.options): if self.exclude():
yield ServiceError("Excluding video") yield ServiceError("Excluding video")
return return