Skip to content

Commit

Permalink
[extractor/GoogleDrive] Add more supported types
Browse files Browse the repository at this point in the history
We import those from the Youtube extractor, and also add:

    '50':'mp3',

for mp3 files scrapping.

Fix: yt-dlp#8281
  • Loading branch information
WyohKnott committed May 11, 2024
1 parent 4cc99d7 commit 5a0ddf2
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions yt_dlp/extractor/googledrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
try_get,
update_url_query,
)
from .youtube import YoutubeIE


class GoogleDriveIE(InfoExtractor):
Expand Down Expand Up @@ -58,22 +59,8 @@ class GoogleDriveIE(InfoExtractor):
'only_matching': True,
}]
_FORMATS_EXT = {
'5': 'flv',
'6': 'flv',
'13': '3gp',
'17': '3gp',
'18': 'mp4',
'22': 'mp4',
'34': 'flv',
'35': 'flv',
'36': '3gp',
'37': 'mp4',
'38': 'mp4',
'43': 'webm',
'44': 'webm',
'45': 'webm',
'46': 'webm',
'59': 'mp4',
**{k: v['ext'] for k, v in YoutubeIE._formats.items() if v.get('ext')},
'50': 'mp3',
}
_BASE_URL_CAPTIONS = 'https://drive.google.com/timedtext'
_CAPTIONS_ENTRY_TAG = {
Expand Down

0 comments on commit 5a0ddf2

Please sign in to comment.