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

picsearch: convert into new video fetcher

This commit is contained in:
Johan Andersson 2014-04-21 18:24:43 +02:00
parent b8752b7ae1
commit 06d7da454f

View File

@ -7,7 +7,7 @@ import sys
from svtplay_dl.service import Service, OpenGraphThumbMixin
from svtplay_dl.utils import get_http_data, select_quality
from svtplay_dl.fetcher.rtmp import download_rtmp
from svtplay_dl.fetcher.rtmp import RTMP
from svtplay_dl.log import log
class Picsearch(Service, OpenGraphThumbMixin):
@ -28,11 +28,6 @@ class Picsearch(Service, OpenGraphThumbMixin):
files = jsondata["media"]["playerconfig"]["playlist"][1]["bitrates"]
server = jsondata["media"]["playerconfig"]["plugins"]["bwcheck"]["netConnectionUrl"]
streams = {}
for i in files:
streams[int(i["height"])] = i["url"]
path = select_quality(options, streams)
options.other = "-y '%s'" % path
download_rtmp(options, server)
options.other = "-y '%s'" % i["url"]
yield RTMP(options, server, i["height"])