mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 22:35:21 +00:00
[GoogleDrive] fix audio extraction
This commit is contained in:
parent
07f7aad81c
commit
5ee8ee8761
@ -37,6 +37,15 @@ class GoogleDriveIE(InfoExtractor):
|
||||
'title': 'Big Buck Bunny.mp4',
|
||||
'duration': 45,
|
||||
}
|
||||
}, {
|
||||
'url': 'https://drive.google.com/file/d/0ByeS4oOUV-49Mk1wNUxGeHEya3c/view',
|
||||
'md5': 'cc757300594a69bcf10edd93bfe2c23c',
|
||||
'info_dict': {
|
||||
'id': '0ByeS4oOUV-49Mk1wNUxGeHEya3c',
|
||||
'ext': 'mp3',
|
||||
'title': 'universo.mp3',
|
||||
'duration': None,
|
||||
}
|
||||
}, {
|
||||
# video can't be watched anonymously due to view count limit reached,
|
||||
# but can be downloaded (see https://github.com/ytdl-org/youtube-dl/issues/14046)
|
||||
@ -173,6 +182,13 @@ class GoogleDriveIE(InfoExtractor):
|
||||
reason = get_value('reason')
|
||||
title = get_value('title')
|
||||
if not title and reason:
|
||||
# try old style title extraction
|
||||
webpage = self._download_webpage(
|
||||
'http://docs.google.com/file/d/%s' % video_id, video_id)
|
||||
title = self._search_regex(
|
||||
r'"title"\s*,\s*"([^"]+)', webpage, 'title',
|
||||
default=None) or self._og_search_title(webpage)
|
||||
if not title:
|
||||
raise ExtractorError(reason, expected=True)
|
||||
|
||||
formats = []
|
||||
|
Loading…
Reference in New Issue
Block a user