mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 07:16:00 +03:00
[GH-ISSUE #236] Error when using YTMusic.get_charts with authenticated user #185
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#185
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 @BruceZhang1993 on GitHub (Nov 26, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/236
Step to reproduce
Error info:
Traceback (most recent call last):
File "/home/bruce/Projects/Python/feeluown-ytmusic/feeluown_ytmusic/service.py", line 84, in
print(json.dumps(service.get_charts()))
File "/home/bruce/Projects/Python/feeluown-ytmusic/feeluown_ytmusic/service.py", line 77, in get_charts
return self.api.get_charts(country)
File "/home/bruce/Projects/Python/feeluown-ytmusic/.venv/lib/python3.9/site-packages/ytmusicapi/mixins/explore.py", line 235, in get_charts
'playlist': nav(results[1 + i], CAROUSEL + CAROUSEL_TITLE + NAVIGATION_BROWSE_ID,
IndexError: list index out of range
@sigma67 commented on GitHub (Nov 28, 2021):
Hm, the same call works fine for me. I'm suspecting some kind of YouTube update. Can you go to the charts page and screenshot it for me to compare? Or even better, provide a JSON of the response after navigating to the US filtered page? See screenshot.
@BruceZhang1993 commented on GitHub (Nov 29, 2021):
@sigma67
Here is full JSON from the result of _send_request
https://fars.ee/DTCT
Here is full JSON from YouTube Music webpage
http://r.fars.ee/smbj
@sigma67 commented on GitHub (Dec 1, 2021):
You are missing the "Top songs" category, which is very unusual. Do you have any idea why that is missing for you?
@BruceZhang1993 commented on GitHub (Dec 1, 2021):
totally have no idea why. is it only for my youtube account ?
@sigma67 commented on GitHub (Dec 1, 2021):
Not sure, what happens when you access the site while logged out? This is what you should see normally:
@BruceZhang1993 commented on GitHub (Dec 1, 2021):
@sigma67 I am using youtube music from unsupported regions with vpn. any chance this could be the reason ?
@sigma67 commented on GitHub (Dec 12, 2021):
That is most likely the reason. Not sure if it's worth implementing a workaround for this niche case
@BruceZhang1993 commented on GitHub (Dec 13, 2021):
Thanks a lot anyway, i'll try to find a workaround in my project.