1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

Fix for DN.se

This commit is contained in:
Johan Andersson 2012-01-28 14:34:21 +01:00
parent 7dbf364148
commit f731916d1a

View File

@ -164,9 +164,9 @@ class Qbrick(Common):
server = xml.find("head").find("meta").attrib["base"] server = xml.find("head").find("meta").attrib["base"]
streams = xml.find("body").find("switch") streams = xml.find("body").find("switch")
if sys.version_info < (2, 7): if sys.version_info < (2, 7):
sa = list(ss.getiterator("video")) sa = list(streams.getiterator("video"))
else: else:
sa = list(ss.iter("video")) sa = list(streams.iter("video"))
streams = {} streams = {}
for i in sa: for i in sa:
streams[int(i.attrib["system-bitrate"])] = i.attrib["src"] streams[int(i.attrib["system-bitrate"])] = i.attrib["src"]
@ -545,11 +545,11 @@ def main():
elif re.findall("dn.se", url): elif re.findall("dn.se", url):
common = Common() common = Common()
data = common.getdata(url) data = common.getdata(url)
match = re.search("data-qbrick-mcid=\"([0-9A-F]+)\" data-qbrick", data) match = re.search("mediaId = \'([0-9A-F]+)\';", data)
if not match: if not match:
print("Something wrong with that url") print("Something wrong with that url")
sys.exit(2) sys.exit(2)
qbrick = Qbrick(output, quality, live, match.group(1), resume) qbrick = Qbrick(output, quality, live, match.group(1) + "DE1BA107", resume)
qbrick.get("http://vms.api.qbrick.com") qbrick.get("http://vms.api.qbrick.com")
elif re.findall("di.se", url): elif re.findall("di.se", url):