From 5a0ddf296bbc5be8f853c69074e706c6b595f4b3 Mon Sep 17 00:00:00 2001 From: WyohKnott Date: Sat, 11 May 2024 16:13:11 +0200 Subject: [PATCH] [extractor/GoogleDrive] Add more supported types We import those from the Youtube extractor, and also add: '50':'mp3', for mp3 files scrapping. Fix: #8281 --- yt_dlp/extractor/googledrive.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/yt_dlp/extractor/googledrive.py b/yt_dlp/extractor/googledrive.py index 06658dd47..5f5f7dba9 100644 --- a/yt_dlp/extractor/googledrive.py +++ b/yt_dlp/extractor/googledrive.py @@ -13,6 +13,7 @@ try_get, update_url_query, ) +from .youtube import YoutubeIE class GoogleDriveIE(InfoExtractor): @@ -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 = {