Skip to content
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

[extractor/GoogleDrive] Add more supported types #9908

Merged
merged 16 commits into from May 12, 2024

Conversation

WyohKnott
Copy link
Contributor

[extractor/GoogleDrive] Add more supported types

We import those from the Youtube extractor, and also add:

'50':'mp3',

for mp3 files scrapping.

Fixes #8281

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

yt_dlp/extractor/googledrive.py Outdated Show resolved Hide resolved
yt_dlp/extractor/googledrive.py Outdated Show resolved Hide resolved
@bashonly bashonly added site-bug Issue with a specific website pending-fixes PR has had changes requested labels May 11, 2024
yt_dlp/extractor/googledrive.py Outdated Show resolved Hide resolved
yt_dlp/extractor/googledrive.py Outdated Show resolved Hide resolved
@bashonly
Copy link
Member

also in the future please do not force push, all commits will be squashed upon merge

yt_dlp/extractor/googledrive.py Outdated Show resolved Hide resolved
yt_dlp/extractor/googledrive.py Outdated Show resolved Hide resolved
@bashonly bashonly removed the pending-fixes PR has had changes requested label May 11, 2024
@WyohKnott
Copy link
Contributor Author

also in the future please do not force push, all commits will be squashed upon merge

Had to force some, wrong identity as I am not on my laptop.

@WyohKnott
Copy link
Contributor Author

Ok I have trouble matching the md5sum:

-f 50 e94c9cbb9cf9c9724f71ce53141d5a2f
-f source fc6291214bab683b9e6126c5933d91bf == md5 of original file.

However:

test/test_download.py:252: in test_template
    self.assertEqual(tc['md5'], md5_for_file)
E   AssertionError: 'e94c9cbb9cf9c9724f71ce53141d5a2f' != '322db8d63dd19788c04050a4bba67073'
E   - e94c9cbb9cf9c9724f71ce53141d5a2f
E   + 322db8d63dd19788c04050a4bba67073

@bashonly
Copy link
Member

use the value that the test script gives you. It is only hashing the first 10B of the file

@WyohKnott
Copy link
Contributor Author

WyohKnott commented May 11, 2024

Ok we're clear, the test passes.

Thanks a lot for your help and time!

@bashonly
Copy link
Member

please stop force pushing, you vaporized my changes

also, when I download format 50 and ffprobe it, it says it is m4a/aac

@bashonly bashonly added the pending-fixes PR has had changes requested label May 11, 2024
yt_dlp/extractor/googledrive.py Outdated Show resolved Hide resolved
yt_dlp/extractor/googledrive.py Outdated Show resolved Hide resolved
@bashonly bashonly removed the pending-fixes PR has had changes requested label May 11, 2024
@WyohKnott
Copy link
Contributor Author

Hmmm indeed:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'My Buddy - Henry Burr - Gus Kahn - Walter Donaldson.mp3 [1IP0o8dHcQrIHGgVyp0Ofvx2cGfLzyO1x].mp3':
  Metadata:
    major_brand     : M4A 
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Google
  Duration: 00:03:04.69, start: 0.000000, bitrate: 129 kb/s
  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
      vendor_id       : [0][0][0][0]

So the source file is mp3, Google converts it in m4a, well sorry about that. Curious that some files work an others don't though.

@bashonly
Copy link
Member

I don't think google/youtube encodes anything in mp3

@bashonly bashonly self-assigned this May 11, 2024
@bashonly bashonly merged commit 85ec2a3 into yt-dlp:master May 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downloadling audio files (m4a, mp3) from google drive
3 participants