mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-29 21:52:54 +00:00
[generic] Support application/ogg for direct links
Also remove some debugging code.
This commit is contained in:
parent
e029b8bd43
commit
3e78514568
1 changed files with 2 additions and 2 deletions
|
@ -164,18 +164,18 @@ class GenericIE(InfoExtractor):
|
||||||
|
|
||||||
# Check for direct link to a video
|
# Check for direct link to a video
|
||||||
content_type = response.headers.get('Content-Type', '')
|
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:
|
if m:
|
||||||
upload_date = response.headers.get('Last-Modified')
|
upload_date = response.headers.get('Last-Modified')
|
||||||
if upload_date:
|
if upload_date:
|
||||||
upload_date = unified_strdate(upload_date)
|
upload_date = unified_strdate(upload_date)
|
||||||
assert (url_basename(url) == 'trailer.mp4')
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': os.path.splitext(url_basename(url))[0],
|
'title': os.path.splitext(url_basename(url))[0],
|
||||||
'formats': [{
|
'formats': [{
|
||||||
'format_id': m.group('format_id'),
|
'format_id': m.group('format_id'),
|
||||||
'url': url,
|
'url': url,
|
||||||
|
'vcodec': u'none' if m.group('type') == 'audio' else None
|
||||||
}],
|
}],
|
||||||
'upload_date': upload_date,
|
'upload_date': upload_date,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue