1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-28 06:04:17 +01:00

qbrick: convert into new video fetcher

This commit is contained in:
Johan Andersson 2014-04-21 18:24:26 +02:00
parent efeaff58be
commit b8752b7ae1

View File

@ -9,7 +9,7 @@ from svtplay_dl.service import Service, OpenGraphThumbMixin
from svtplay_dl.utils import get_http_data, select_quality, is_py2_old
from svtplay_dl.utils.urllib import unquote_plus
from svtplay_dl.log import log
from svtplay_dl.fetcher.rtmp import download_rtmp
from svtplay_dl.fetcher.rtmp import RTMP
class Qbrick(Service, OpenGraphThumbMixin):
supported_domains = ['di.se', 'svd.se', 'sydsvenskan.se']
@ -69,12 +69,7 @@ class Qbrick(Service, OpenGraphThumbMixin):
sa = list(streams.getiterator("video"))
else:
sa = list(streams.iter("video"))
streams = {}
for i in sa:
streams[int(i.attrib["system-bitrate"])] = i.attrib["src"]
path = select_quality(options, streams)
options.other = "-y '%s'" % path
download_rtmp(options, server)
options.other = "-y '%s'" % i.attrib["src"]
yield RTMP(options, server, i.attrib["system-bitrate"])