custom-components / youtube

A platform which give you info about the newest video on a channel
MIT License
55 stars 17 forks source link

Fix for change in consent approve #64

Closed jonnybergdahl closed 6 months ago

jonnybergdahl commented 1 year ago

My Youtube integration stopped working and I discovered it was because Youtube showed the Consent dialog and was waiting for the user to click a button. It seems adding the "CONSENT=YES+cb" cookie is no longer enough.

I replaced the existing cookie handling by switching toClientSession to handle requests instead. In the startup code I request the CHANNEL_LIVE_URL and check if returns a consent dialog. If so, I search for the first form tag found and POST the form. This returns the proper consent cookies, which are stored by the session for all later calls.

jonnybergdahl commented 11 months ago

Hey @pinkywafer want to check this one out?