diff options
author | Philipp Hagemeister <[email protected]> | 2014-12-08 17:17:15 +0100 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2014-12-08 17:17:22 +0100 |
commit | 09a5dd2d3be02a5fca7639a77c5dcf970bfa0e8f (patch) | |
tree | 2c227efc2d3c54d1d353e7e16f9e116c72d51de9 | |
parent | 603c92080fd9923f4a17f9ee67fac99494a92bc7 (diff) | |
download | youtube-dl-09a5dd2d3be02a5fca7639a77c5dcf970bfa0e8f.tar.gz youtube-dl-09a5dd2d3be02a5fca7639a77c5dcf970bfa0e8f.zip |
[bliptv] Add support for audio-only files (Fixes #4404)
-rw-r--r-- | youtube_dl/extractor/bliptv.py | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/youtube_dl/extractor/bliptv.py b/youtube_dl/extractor/bliptv.py index da47f27bd..14b814120 100644 --- a/youtube_dl/extractor/bliptv.py +++ b/youtube_dl/extractor/bliptv.py @@ -4,13 +4,17 @@ import re from .common import InfoExtractor from .subtitles import SubtitlesInfoExtractor -from ..utils import ( + +from ..compat import ( + compat_str, compat_urllib_request, - unescapeHTML, - parse_iso8601, compat_urlparse, +) +from ..utils import ( clean_html, - compat_str, + int_or_none, + parse_iso8601, + unescapeHTML, ) @@ -78,7 +82,25 @@ class BlipTVIE(SubtitlesInfoExtractor): 'uploader': 'NostalgiaCritic', 'uploader_id': '246467', } - } + }, + { + # https://github.com/rg3/youtube-dl/pull/4404 + 'note': 'Audio only', + 'url': 'http://blip.tv/hilarios-productions/weekly-manga-recap-kingdom-7119982', + 'md5': '76c0a56f24e769ceaab21fbb6416a351', + 'info_dict': { + 'id': '7103299', + 'ext': 'flv', + 'title': 'Weekly Manga Recap: Kingdom', + 'description': 'And then Shin breaks the enemy line, and he's all like HWAH! And then he slices a guy and it's all like FWASHING! And... it's really hard to describe the best parts of this series without breaking down into sound effects, okay?', + 'timestamp': 1417660321, + 'upload_date': '20141204', + 'uploader': 'The Rollo T', + 'uploader_id': '407429', + 'duration': 7251, + 'vcodec': 'none', + } + }, ] def _real_extract(self, url): @@ -145,11 +167,11 @@ class BlipTVIE(SubtitlesInfoExtractor): 'url': real_url, 'format_id': role, 'format_note': media_type, - 'vcodec': media_content.get(blip('vcodec')), + 'vcodec': media_content.get(blip('vcodec')) or 'none', 'acodec': media_content.get(blip('acodec')), 'filesize': media_content.get('filesize'), - 'width': int(media_content.get('width')), - 'height': int(media_content.get('height')), + 'width': int_or_none(media_content.get('width')), + 'height': int_or_none(media_content.get('height')), }) self._sort_formats(formats) |