From: Sergey M․ Date: Fri, 28 Mar 2014 16:09:56 +0000 (+0700) Subject: [ntv] Move app guess outside formats loop X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=8f6562448c7fe1ce6723300ed46c3f51a92c52ac;p=youtube-dl [ntv] Move app guess outside formats loop --- diff --git a/youtube_dl/extractor/ntv.py b/youtube_dl/extractor/ntv.py index 29e8f7a04..e998d156e 100644 --- a/youtube_dl/extractor/ntv.py +++ b/youtube_dl/extractor/ntv.py @@ -125,13 +125,14 @@ class NTVIE(InfoExtractor): '7': 'video2', } + app = apps[puid22] if puid22 in apps else apps['4'] + formats = [] for format_id in ['', 'hi', 'webm']: file = video.find('./%sfile' % format_id) if file is None: continue size = video.find('./%ssize' % format_id) - app = apps[puid22] if puid22 in apps else apps['4'] formats.append({ 'url': 'rtmp://media.ntv.ru/%s' % app, 'app': app,