Elijas / auto-youtube-subscription-playlist-2

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

YouTube search broken -> App broken #34

Closed JesperDramsch closed 5 years ago

JesperDramsch commented 5 years ago

Currently the app is broken and it's basically impossible to fix, without rewriting this thing entirely.

https://support.google.com/youtube/thread/2494861?hl=en

YouTube have broken their search filters a couple days ago. You can try it out on the website itself too, it's not just the API we use.

Writing this as top issue for people to find easily. The rewrite of this app would include some kind of cache of videos that have already been added. Considering the amount of work this would take and the space this would take up, I'd suggest waiting until YouTube itself is fixed.

You can subscribe to the issue on Google to get updated. The newest version here with PR #33 will not stop the error messages, but it will make sure the script will start with the videos where YouTube got broken, instead of updating itself despite the errors.

JesperDramsch commented 5 years ago

This also explains the quota errors:

Before the search would return only video IDs after the timestamp in your spreadsheet. Then add each one.

The quota costs are outlined here.

Now that filters are broken, YouTube returns ALL videos from a channel and adds every video to the playlist instead of only the most recent ones. Depending on the channel, that's a whole lot of videos to write.

Since quotas are daily, that will cause some funny behaviour.

Elijas commented 5 years ago

33 is merged

The info and work done is much appreciated! 🥇

JesperDramsch commented 5 years ago

33 is merged

The info and work done is much appreciated! 🥇

Thanks! Hope this will help some people find the right answers. I was thoroughly confused why my gmail was getting spammed 🤷‍♂️

LSC2019 commented 5 years ago

Thank you, this is very helpful. I wondered why i reached my Youtube API quota everyday;)

aspera7 commented 5 years ago

So basically the script has no chance to work until google fixes their stuff? That's unfortunate

JesperDramsch commented 5 years ago

That is correct. Try the search on their website. Can't sort by date

Alleckz commented 5 years ago

Have a workaround, that is valid even after this is fixed (if Google dont f.. up there api even more). Ide from https://stackoverflow.com/a/55207539. Its cost a little more api call point but seams valid, just tried it for one chanel. (Hope there are no edge cases that is not valid)

  1. You use the Chanel.list, and in ”part” add “contentDetails” cost 2 points. (Can probebly be done on init where we get the channel id grab. But if it’s a one time thing we need too test soo the playlist id don’t change overtime)
  2. Then you get the get the “contentDetails.relatedPlaylists.uploads”
  3. Add that Chanel uploads playlist id to the playlistItems.list
  4. Wolla You have a sorted list of all uploads from a Chanel and the latest video is on top :D

I may have some time this week to try to implement this but no promessis.

oberien commented 5 years ago

From what I've read, the google video search should still work. Maybe a swap from the youtube API to the google video API might be possible until google fixes youtube's APIs.

oberien commented 5 years ago

The API is back up since ~20 hours, so I guess this can be closed now :tada:

Fabian42 commented 5 years ago

Confirmed, it runs fine for me again. It even checked the last 12 days of my 84 sources and added 46 videos without going over the time limit. Interestingly, I got no notification from the followed YouTube bug report.