New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downloadling audio files (m4a, mp3) from google drive #8281
Comments
seems like we just need to add IDs for audio file extensions, something like this: diff --git a/yt_dlp/extractor/googledrive.py b/yt_dlp/extractor/googledrive.py
index 2fdec20f6..b51a2fa1a 100644
--- a/yt_dlp/extractor/googledrive.py
+++ b/yt_dlp/extractor/googledrive.py
@@ -70,7 +70,9 @@ class GoogleDriveIE(InfoExtractor):
'44': 'webm',
'45': 'webm',
'46': 'webm',
+ '50': 'm4a',
'59': 'mp4',
+ '140': 'mp3',
}
_BASE_URL_CAPTIONS = 'https://drive.google.com/timedtext'
_CAPTIONS_ENTRY_TAG = { |
Yeah exactly. I was wondering if this is an intentional choice (for some technical reasons) to not allow downloading audio files from google drive or not. |
IMO yt-dlp shouldn't fail completely if a format extension isn't known I'm not that familiar with the gdrive extractor though |
FWIW I was unable to download a specific video file from Drive until I patched diff --git a/yt_dlp/extractor/googledrive.py b/yt_dlp/extractor/googledrive.py
index 2fdec20f6..4bb96f22e 100644
--- a/yt_dlp/extractor/googledrive.py
+++ b/yt_dlp/extractor/googledrive.py
@@ -71,6 +71,9 @@ class GoogleDriveIE(InfoExtractor):
'45': 'webm',
'46': 'webm',
'59': 'mp4',
+ '134': 'mp4',
+ '136': 'mp4',
+ '140': 'mp4',
}
_BASE_URL_CAPTIONS = 'https://drive.google.com/timedtext'
_CAPTIONS_ENTRY_TAG = { Not sure where the |
I've got the same error with an m4a error :
I anonymize the URL because it's note mine.
|
None of the posted URLs work anymore. Someone needs to provide working URLs for this to be fixed |
Very strange.
I cannot send the real URL because the file is not mine, and contents personal data. |
We import those from the Youtube extractor, and also add: '50':'mp3', for mp3 files scrapping. Fix: yt-dlp#8281
We import those from the Youtube extractor, and also add: '50':'mp3', for mp3 files scrapping. Fix: yt-dlp#8281
We import those from the Youtube extractor, and also add: '50':'mp3', for mp3 files scrapping. Fix: yt-dlp#8281
We import those from the Youtube extractor, and also add: '50':'mp3', for mp3 files scrapping. Fix: yt-dlp#8281
Closes #8281 Authored by: WyohKnott
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Please make sure the question is worded well enough to be understood
I'm using the following python code to download audio files (with m4a and mp3 formats) from google drive:
Strangely, when I try a link for the first time, they are downloaded without any issues, but when I try to download the same file using the same URL again (e.g. when I'm changing other parts of my code and I'm in the process of developing my script) I can't download the files and I get the following error (for m4a file):
And almost the same error with
KeyError: '140'
for mp3 files. I looked into the google drive extractor part of the code, and the answer to my question probably is "yt-dlp doesn't support downloading audio files from google drive", but since it is able to download them sometimes, I thought I'm missing something probably.Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
(pasted in the question above)
The text was updated successfully, but these errors were encountered: