Skip to content

[v3] YouTube oembed returning consent.youtube.com link #434

@lozcalver

Description

@lozcalver

This isn’t really an issue with this library (at least, I’m 99% sure it isn’t) so I’ll close this straight away - I just wanted to post it here for visibility, in case someone else like me is searching for this problem and also wondering if they’re alone...

https://youtube.com/oembed is sometimes returning an iframe as expected, and sometimes returning an anchor which links to https://consent.youtube.com:

<a href="https://consent.youtube.com/ml?continue=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D<VIDEOIDHERE>%26feature%3Dyoutu.be&amp;gl=GB&amp;hl=en-GB&amp;pc=yt&amp;uxe=24020388&amp;src=1">
    Before you continue to YouTube
</a>

I can’t recreate this locally, or even reliably on the live site, so it’s really difficult to try to debug what’s happening here. Given that the consent URL wants to redirect to the video, and not https://youtube.com/oembed, I can only assume that it is actually reaching the oembed API and that is returning the consent URL. Requesting the same embed code again later seems to work fine, so my best guess is that it depends which of YouTube’s edge servers responds.

I’ve reported it to YouTube via the “Send Feedback” thing as that’s the only place I could find to report an issue. I have no idea if I should expect a response!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions