-
Notifications
You must be signed in to change notification settings - Fork 216
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
2021 Recap playlist breaking get_playlist
#242
Comments
I believe the issue is that you are assuming the playlist year is in fifth index of the subtitle runs here. I.e. {'text': 'Playlist'}
{'text': ' • '}
{'text': 'YouTube Music'}
{'text': ' • '}
{'text': '2021'} ### <-- HERE However for the 2021 recap it looks like this: {'text': 'Unlisted'}
{'text': ' • '}
{'text': 'Made for '}
{'text': 'ACCOUNT_USERNAME'} You should guard against the case where the runs list is EXACTLY 4 in length, which is causing the index out of bounds (different schema). You can look for the playlist year elsewhere or just set it to be empty. |
Unfortunately I don't have access to the recap yet so I can't test it. I don't suppose it's shareable? I think we should change > 3 to = 5 to be more precise. |
That seems like the right fix yes, since you are assuming the fifth index is non null. If it is null, just ignoring the year seems like the simplest action for now. If you want a 2021 Recap test case, you need to save your 2021 Recap as a playlist and make it pubic before the API can access it I believe. |
Fix issue [242](sigma67#242) by changing run_count check to == 5.
Fix issue [242](sigma67/ytmusicapi#242) by changing run_count check to == 5.
Python 3.9, ytmusicapi 0.19.5
I am trying to pull the 2021 Recap playlist. When I pull a different playlist (change index on first line to 0, 2, etc) the code works.
Seems to be the 2021 Recap playlist only.
code:
Stack trace:
The text was updated successfully, but these errors were encountered: