Skip to content

Commit

Permalink
qbrick: sydsvenskan is not supported anymore
Browse files Browse the repository at this point in the history
fixes #216
  • Loading branch information
spaam committed Mar 8, 2015
1 parent fce27d5 commit 70ef4a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -73,7 +73,6 @@ This script works for:
* svd.se
* sverigesradio.se
* svtplay.se
* sydsvenskan.se
* tv10play.se
* tv3play.dk
* tv3play.ee
Expand Down
23 changes: 2 additions & 21 deletions lib/svtplay_dl/service/qbrick.py
Expand Up @@ -12,7 +12,7 @@
from svtplay_dl.fetcher.rtmp import RTMP

class Qbrick(Service, OpenGraphThumbMixin):
supported_domains = ['di.se', 'sydsvenskan.se']
supported_domains = ['di.se']

def get(self, options):
error, data = self.get_urldata()
Expand All @@ -23,14 +23,7 @@ def get(self, options):
if self.exclude(options):
return

if re.findall(r"sydsvenskan.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):
if re.findall(r"di.se", self.url):
match = re.search("src=\"(http://qstream.*)\"></iframe", data)
if not match:
log.error("Can't find video info for: %s", self.url)
Expand All @@ -41,18 +34,6 @@ def get(self, options):
log.error("Can't find video file for: %s", self.url)
return
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:
log.error("Can't find any info for %s", self.url)
return
Expand Down

0 comments on commit 70ef4a3

Please sign in to comment.