Elijas / auto-youtube-subscription-playlist-2

Script automatically adds videos to playlists from Youtube channels and/or subscriptions (Youtube Collections alternative).
MIT License
246 stars 54 forks source link

Pagination broke, thanks Google #96

Closed victorjzsun closed 3 years ago

victorjzsun commented 3 years ago

New bug related to pagination tracked at https://issuetracker.google.com/issues/196478069?pli=1. If you see an error message similar to API call to youtube.playlistItems.list failed with error: The request specifies an invalid page token., this is the reason

Will implement retry mechanism as a temporary solution asap

danteali commented 3 years ago

Thanks for highlighting the issue.

It's weird since the playlist ID quoted in the error matches the channel ID but with the channel's initial UC replaced by UU. I wonder if there is something in the code that can fix this? There is some playlist/user/channel validation taking place and if YouTube changed an API this may need updated? Only guessing though since I haven't had time yet to test anything.

Doesn't seem to be effecting channels where I can list them by username instead of channel ID. Or where I have specific playlists IDs listed.

Not all channels have a 'username' - I believe the channel needs to reach a certain subscriber number before YouTube offers the owner the ability to have a plain text username. But where you can, it may be worth swapping any channel IDs for usernames.

victorjzsun commented 3 years ago

For usernames, I still go through the uploads playlist (UU...) to get the videos so there's no difference there. If provided a username, I just add a step to get the channel ID from the username and then use that to get videos.

I was also able to get an error using a proper playlist ID (PL...) so it's not just a UU... playlist problem. I don't think this is an intended change, so will try to use a workaround for the time being and follow the API/issuetracker for progress

victorjzsun commented 3 years ago

As of 2h ago, this issue should be fixed as mentioned in https://issuetracker.google.com/issues/196413673#comment15.