Browse Source

[escapist] Filter video differently (Fixes #4919)

totalwebcasting
Philipp Hagemeister 10 years ago
parent
commit
9650885be9
2 changed files with 5 additions and 2 deletions
  1. +1
    -1
      youtube_dl/extractor/common.py
  2. +4
    -1
      youtube_dl/extractor/escapist.py

+ 1
- 1
youtube_dl/extractor/common.py View File

@ -271,7 +271,7 @@ class InfoExtractor(object):
raise raise
except compat_http_client.IncompleteRead as e: except compat_http_client.IncompleteRead as e:
raise ExtractorError('A network error has occured.', cause=e, expected=True) 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) raise ExtractorError('An extractor error has occured.', cause=e)
def set_downloader(self, downloader): def set_downloader(self, downloader):


+ 4
- 1
youtube_dl/extractor/escapist.py View File

@ -54,8 +54,11 @@ class EscapistIE(InfoExtractor):
transform_source=js_to_json) transform_source=js_to_json)
playlist = config['playlist'] playlist = config['playlist']
video_url = next(
p['url'] for p in playlist
if p.get('eventCategory') == 'Video')
formats.append({ formats.append({
'url': playlist[1]['url'],
'url': video_url,
'format_id': name, 'format_id': name,
'quality': quality, 'quality': quality,
}) })


Loading…
Cancel
Save