commit: 9650885be954b3cc626205aa67f24c31f21da7b6
parent 596ac6e31f6baaadf8280e2c54ca90a7cf2fbc2a
Author: Philipp Hagemeister <phihag@phihag.de>
Date: Tue, 10 Feb 2015 15:55:51 +0100
[escapist] Filter video differently (Fixes #4919)
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
@@ -271,7 +271,7 @@ class InfoExtractor(object):
raise
except compat_http_client.IncompleteRead as e:
raise ExtractorError('A network error has occured.', cause=e, expected=True)
- except (KeyError,) as e:
+ except (KeyError, StopIteration) as e:
raise ExtractorError('An extractor error has occured.', cause=e)
def set_downloader(self, downloader):
diff --git a/youtube_dl/extractor/escapist.py b/youtube_dl/extractor/escapist.py
@@ -54,8 +54,11 @@ class EscapistIE(InfoExtractor):
transform_source=js_to_json)
playlist = config['playlist']
+ video_url = next(
+ p['url'] for p in playlist
+ if p.get('eventCategory') == 'Video')
formats.append({
- 'url': playlist[1]['url'],
+ 'url': video_url,
'format_id': name,
'quality': quality,
})