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

qbrick: sydsvenskan is not supported anymore

fixes #216
This commit is contained in:
Johan Andersson 2015-03-08 14:46:27 +01:00
parent fce27d5736
commit 70ef4a30a5
2 changed files with 2 additions and 22 deletions

View File

@ -73,7 +73,6 @@ This script works for:
* svd.se * svd.se
* sverigesradio.se * sverigesradio.se
* svtplay.se * svtplay.se
* sydsvenskan.se
* tv10play.se * tv10play.se
* tv3play.dk * tv3play.dk
* tv3play.ee * tv3play.ee

View File

@ -12,7 +12,7 @@ from svtplay_dl.log import log
from svtplay_dl.fetcher.rtmp import RTMP from svtplay_dl.fetcher.rtmp import RTMP
class Qbrick(Service, OpenGraphThumbMixin): class Qbrick(Service, OpenGraphThumbMixin):
supported_domains = ['di.se', 'sydsvenskan.se'] supported_domains = ['di.se']
def get(self, options): def get(self, options):
error, data = self.get_urldata() error, data = self.get_urldata()
@ -23,14 +23,7 @@ class Qbrick(Service, OpenGraphThumbMixin):
if self.exclude(options): if self.exclude(options):
return return
if re.findall(r"sydsvenskan.se", self.url): if re.findall(r"di.se", self.url):
match = re.search(r"data-qbrick-mcid=\"([0-9A-F]+)\"", data)
if not match:
log.error("Can't find video file for: %s", self.url)
return
mcid = match.group(1)
host = "http://vms.api.qbrick.com/rest/v3/getsingleplayer/%s" % mcid
elif re.findall(r"di.se", self.url):
match = re.search("src=\"(http://qstream.*)\"></iframe", data) match = re.search("src=\"(http://qstream.*)\"></iframe", data)
if not match: if not match:
log.error("Can't find video info for: %s", self.url) log.error("Can't find video info for: %s", self.url)
@ -41,18 +34,6 @@ class Qbrick(Service, OpenGraphThumbMixin):
log.error("Can't find video file for: %s", self.url) log.error("Can't find video file for: %s", self.url)
return return
host = "http://vms.api.qbrick.com/rest/v3/getplayer/%s" % match.group(1) host = "http://vms.api.qbrick.com/rest/v3/getplayer/%s" % match.group(1)
elif re.findall(r"svd.se", self.url):
match = re.search(r'video url-([^"]*)\"', self.get_urldata()[1])
if not match:
log.error("Can't find video file for: %s", self.url)
return
path = unquote_plus(match.group(1))
error, data = get_http_data("http://www.svd.se%s" % path)
match = re.search(r"mcid=([A-F0-9]+)\&width=", data)
if not match:
log.error("Can't find video file for: %s", self.url)
return
host = "http://vms.api.qbrick.com/rest/v3/getsingleplayer/%s" % match.group(1)
else: else:
log.error("Can't find any info for %s", self.url) log.error("Can't find any info for %s", self.url)
return return