mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 07:16:00 +03:00
[GH-ISSUE #718] Error to reading album information (using get_album(), some part comes as None) #468
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#468
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NangmanGureum on GitHub (Jan 12, 2025).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/718
Describe the bug
In a nutshell, there are a lot of
Nonein browse result. ABNORMALLY.When I browse an album via
get_album(), I found there's lot of unavailable things (In other words, its were can use previously.)Compare with an example on document, you can see a lot of different points.
To Reproduce
Here's my enviroment.
OS: Windows 11 (23H2, 22631.4602)
Python version: 3.9.13
YouTube API: YouTube Data API v3 (Latest update: 22. 7. 22. )
ytmusicapiversion: 1.9.1Run this code below (with your
oauth.json)And it comes(with some omission):
Additional context
My
oauth.json(which using to reproduce a bug) is made to following OAuth authentication document.@sigma67 commented on GitHub (Jan 17, 2025):
cannot reproduce
@NangmanGureum commented on GitHub (Jan 18, 2025):
I've revisited how to reproduce.
My setup
OS: macOS 15.1(24B83)
Python version: 3.13.1
YouTube API: YouTube Data API v3 (Latest update: 22. 7. 22. )
ytmusicapiversion: 1.9.1Google Cloud (YouTube API) setup
How to check the key
ytmusicapisetupytmusicapiviapip.ytmusicapi oauthon where the code is. and follow the instructions. (See: https://ytmusicapi.readthedocs.io/en/stable/setup/oauth.html )Result
This is different from the example in
YTMusic.get_album(), where neither thevideoIdnor thelikeStatusvalues come out asNone(in other words, the intended result is notNone).My hypothesis
I don't have a hypothesis at the moment, except to say that the configuration of the “YouTube Data API v3” in Google Cloud is different, or that
ytmusicapidoesn't handle the data it receives from the API properly (e.g. ytmusicapi was adapted to an earlier version of the API).Another hypothesis is that in South Korea, you need to subscribe to YouTube Premium to access YouTube Music. The above case could have been the result of an API associated with a Korean account that did not have a YouTube Premium subscription.
So I signed up for YouTube Premium on the linked Google account and still got the same result, which suggests that the issue is not with YouTube Premium.
Now, you might be thinking that you can use "Browser authentication" instead of "OAuth authentication", and I tried that, but when I went to the YouTube Music homepage, I couldn't find any POST corresponding to `browse?...'.
Conclusion
This doesn't seem like an issue that can be simply dismissed as “cannot reproduce” - I think you need to take a closer look at the issue. Please reopen this issue.
@sigma67 commented on GitHub (Jan 18, 2025):
You're not passing in the OAuth credentials to YTMusic. Sorry about that, it should be mentioned in the docs. Will update in a bit
@NangmanGureum commented on GitHub (Jan 18, 2025):
I see. let me know if it updated.
@sigma67 commented on GitHub (Jan 19, 2025):
@NangmanGureum
The documentation was already up to date: https://ytmusicapi.readthedocs.io/en/latest/setup/oauth.html
If you only looked at the usage chapter you maybe were mislead by the constructor statement. This is fixed now: https://ytmusicapi.readthedocs.io/en/latest/usage.html
I also added an error if oauth JSON is passed without credentials
@NangmanGureum commented on GitHub (Jan 19, 2025):
Ok, I had something misunderstood. Sorry for that.
I think my
oauth.jsonwould have been passed in the OAuth credentials. because, the code has wrote asYTMusic("oauth.json"); and I do the OAuth setup guideline, enter the right API key and secret, get Google API webpage to follow the instructions, see if done as well (it was successfully complete!), and pressEnterkey. isn't it all?I just did which the OAuth setup guideline written as. but the result is still same. Is my
oauth.jsonis wrong?, or my API configure is wrong?I don't mind if you don't hear from me right away, but I'd like to see you look into this more closely. I'd like to see you create a project from scratch in Google Cloud, and create a new API key. For me, “without pass OAuth credentials” doesn't make any sense.
@sigma67 commented on GitHub (Jan 19, 2025):
please read closely
@NangmanGureum commented on GitHub (Jan 19, 2025):
I see. that's my fault. I apologize.
I'll try this thing later.
@NangmanGureum commented on GitHub (Jan 20, 2025):
I try to fix like this(as written at an example):
But I got an error.
So I fix this above one. but I got another error.
Do I something miss? what should I do?