diff options
| author | Philipp Hagemeister <phihag@phihag.de> | 2013-12-17 16:26:32 +0100 | 
|---|---|---|
| committer | Philipp Hagemeister <phihag@phihag.de> | 2013-12-17 16:26:34 +0100 | 
| commit | 3e78514568ddb516d23de052f694c8de7ab469d7 (patch) | |
| tree | c342e6a8c2a5dc6300db0d28b72175bc3ba7401a | |
| parent | e029b8bd43a30211e1ed71ee8a123c9b081d4c22 (diff) | |
[generic] Support application/ogg for direct links
Also remove some debugging code.
| -rw-r--r-- | youtube_dl/extractor/generic.py | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 209f68204..fd32370c2 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -164,18 +164,18 @@ class GenericIE(InfoExtractor):              # Check for direct link to a video              content_type = response.headers.get('Content-Type', '') -            m = re.match(r'^(?:audio|video)/(?P<format_id>.+)$', content_type) +            m = re.match(r'^(?P<type>audio|video|application(?=/ogg$))/(?P<format_id>.+)$', content_type)              if m:                  upload_date = response.headers.get('Last-Modified')                  if upload_date:                      upload_date = unified_strdate(upload_date) -                assert (url_basename(url) == 'trailer.mp4')                  return {                      'id': video_id,                      'title': os.path.splitext(url_basename(url))[0],                      'formats': [{                          'format_id': m.group('format_id'),                          'url': url, +                        'vcodec': u'none' if m.group('type') == 'audio' else None                      }],                      'upload_date': upload_date,                  } | 
