mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
hdsparse: work as the same way as hlsparse
This commit is contained in:
parent
b899072236
commit
0d5a05be64
@ -5,6 +5,7 @@ import base64
|
||||
import struct
|
||||
import logging
|
||||
import binascii
|
||||
import copy
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from svtplay_dl.output import progressbar, progress_stream, ETA, output
|
||||
@ -62,13 +63,14 @@ def hdsparse(options, res, manifest):
|
||||
bootstrap["0"] = i.text
|
||||
parse = urlparse(manifest)
|
||||
querystring = parse.query
|
||||
manifest = "%s://%s%s" % (parse.scheme, parse.netloc, parse.path)
|
||||
for i in mediaIter:
|
||||
if len(bootstrap) == 1:
|
||||
bootstrapid = bootstrap["0"]
|
||||
else:
|
||||
bootstrapid = bootstrap[i.attrib["bootstrapInfoId"]]
|
||||
streams[int(i.attrib["bitrate"])] = HDS(options, i.attrib["url"], i.attrib["bitrate"], manifest=manifest, bootstrap=bootstrapid,
|
||||
metadata=i.find("{http://ns.adobe.com/f4m/1.0}metadata").text, querystring=querystring)
|
||||
streams[int(i.attrib["bitrate"])] = HDS(copy.copy(options), i.attrib["url"], i.attrib["bitrate"], manifest=manifest, bootstrap=bootstrapid,
|
||||
metadata=i.find("{http://ns.adobe.com/f4m/1.0}metadata").text, querystring=querystring, cookies=res.cookies)
|
||||
return streams
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user