Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#14377 closed defect (bug) (invalid)

Some YouTube videos are not processed by oEmbed

Reported by: honza.skypala Owned by:
Priority: normal Milestone:
Component: Embeds Version: 3.0
Severity: normal Keywords: oEmbed
Cc: Focuses:

Description

While majority of YouTube videos for oEmbed work fine (i.e. I just enter the URL on a separate line into blog post and I get an embedded video as a result), it does not work in some cases. For example:

​http://www.youtube.com/watch?v=eNF2eVjXqy8

When I enter this URL into blog post (valid URL for YouTube video), in the displayed post I have the URL, not the embedded video.

Change History (3)

#1 follow-up: @scribu
16 years ago

Maybe that particular video has embeding disabled?

#2 in reply to: ↑ 1 @honza.skypala
16 years ago

Replying to scribu:

Maybe that particular video has embeding disabled?

No, that's not the case, this video has embedding permitted. It's not just this one video, more examples with the same problem (all of them can be normally embedded via YouTube 'get code'):

​http://www.youtube.com/watch?v=nU3FI_jsOJ4
​http://www.youtube.com/watch?v=kHpM7Xf9Ds8
​http://www.youtube.com/watch?v=uYwwn1qJzBw

I guess maybe these URL's don't pass through WP oEmbed regex, but I don't know.

#3 @nacin
16 years ago

  • Milestone Awaiting Review
  • Resolution → invalid
  • Status new → closed

All three of those videos are returning a 401 unauthorized HTTP error code.

​http://www.youtube.com/oembed?url=http://www.youtube.com/watch%3Fv%3DuYwwn1qJzBw

So this is a YouTube issue (or feature, depending on the reason for 401ing). Point is, if it isn't processed by oEmbed, then we're not being given JSON or XML to work with.

The regex is #http://(www\.)?youtube.com/watch.*#i, which would catch these videos.

Also -- the video you originally reported returns JSON for me and works for me.

Note: See TracTickets for help on using tickets.