diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-01-23 22:21:55 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-01-23 22:21:55 +0600 |
commit | ebd46aed5119899826629cf751ba5abe7a65d50b (patch) | |
tree | b72a92fe3e6b7a8047fb9b5baf2e57c8613f86f0 /youtube_dl | |
parent | c2e64f71d075bbc916f343916ff1e679f642a821 (diff) |
[atresplayer] Filter URLs and clarify android format ids
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/atresplayer.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/atresplayer.py b/youtube_dl/extractor/atresplayer.py index 37321ef1d..8fd69b971 100644 --- a/youtube_dl/extractor/atresplayer.py +++ b/youtube_dl/extractor/atresplayer.py @@ -105,7 +105,9 @@ class AtresPlayerIE(InfoExtractor): raise ExtractorError( '%s returned error: %s' % (self.IE_NAME, result), expected=True) - for _, video_url in fmt_json['resultObject'].items(): + for format_id, video_url in fmt_json['resultObject'].items(): + if format_id == 'token' or not video_url.startswith('http'): + continue if video_url.endswith('/Manifest'): if 'geodeswowsmpra3player' in video_url: f4m_path = video_url.split('smil:', 1)[-1].split('free_', 1)[0] @@ -118,7 +120,7 @@ class AtresPlayerIE(InfoExtractor): else: formats.append({ 'url': video_url, - 'format_id': 'android', + 'format_id': 'android-%s' % format_id, 'preference': 1, }) self._sort_formats(formats) |