[DrTuber] Corrected video data for-in loop - fifth requested fixes for PR #13322

This commit is contained in:
Parmjit Virk 2017-06-20 16:51:53 -05:00
parent ab83335789
commit 1137b21a36

View File

@ -52,15 +52,13 @@ class DrTuberIE(InfoExtractor):
})
formats = []
for video_key, video_value in video_data.items():
if video_key == 'files':
for video_url_key, video_url_value in video_data[video_key].items():
if video_url_value:
formats.append({
'format_id': video_url_key.upper(),
'quality': 2 if video_url_key == 'hq' else 1,
'url': video_url_value
})
for video_url_key, video_url_value in video_data['files'].items():
if video_url_value:
formats.append({
'format_id': video_url_key.upper(),
'quality': 2 if video_url_key == 'hq' else 1,
'url': video_url_value
})
self._check_formats(formats, video_id)
self._sort_formats(formats)