Closed kieranhogg closed 9 years ago
I don't think this is a micawber issue as embedly may be doing some magic on their backend.
To clarify, I'm currently using the embedly backend with micawber, should it not be the same result?
Yes, one would think so. Can you post the raw JSON returned by embedly when you request a playlist?
I'm not 100% how I would do that as I'm just using the template filter?
I believe this is an issue with embedly. When bootstrapping a "provider registry" with embedly, micawber calls out to embedly and asks for a list of regexes for the types of URLs it supports. Micawber will then store those regexes and when it finds matching URLs, submit to embedly and return the embed code (iframe, image, etc).
I think embedly may use different code between their website and whatever they use to generate the regex list I'm using.
One note, if I request the HTTP (not HTTPS) version of the first URL you gave me, it does appear to return an embeddable object:
https://www.youtube.com/playlist?list=PLE2714DC8F2BA092D
In [7]: pr.request('http://www.youtube.com/playlist?list=PLE2714DC8F2BA092D')
Out[7]:
{u'description': u'Sign in now to see your channels and recommendations!',
u'height': 480,
u'html': u'<iframe class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLE2714DC8F2BA092D&src=http%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLE2714DC8F2BA092D&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FT9yGcKlYAiw%2Fmqdefault.jpg&type=text%2Fhtml&schema=youtube" width="853" height="480" scrolling="no" frameborder="0" allowfullscreen></iframe>',
u'provider_name': u'YouTube',
u'provider_url': u'http://youtube.com',
u'thumbnail_height': 180,
u'thumbnail_url': u'https://i.ytimg.com/vi/T9yGcKlYAiw/mqdefault.jpg',
u'thumbnail_width': 320,
u'title': u'Example Playlist - YouTube',
u'type': u'video',
'url': 'http://www.youtube.com/playlist?list=PLE2714DC8F2BA092D',
u'version': u'1.0',
u'width': 853}
Note the difference between what is responded when submitting the "videoseries?list=...":
In [9]: pr.request('https://www.youtube.com/embed/videoseries?list=PLE2BA092D')
Out[9]:
{u'height': 480,
u'html': u'<iframe class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLE2714DC8F2BA092D&src=http%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries&type=text%2Fhtml&schema=youtube" width="854" height="480" scrolling="no" frameborder="0" allowfullscreen></iframe>',
u'provider_name': u'YouTube',
u'provider_url': u'http://youtube.com',
'title': u'http://www.youtube.com/watch?v=videoseries',
u'type': u'video',
u'url': u'http://www.youtube.com/watch?v=videoseries',
u'version': u'1.0',
u'width': 854}
You may want to open a ticket with embedly to look into tihs further.
You may also consider rolling with native oembed providers using bootstrap_basic()
instead.
Update from embedly: Ok, yes it looks like this is using our services API, we created this early on as a way to filter down URLs to embed providers. This is a manually created list and unfortunately some permutations of a URL may not be captured. We generally suggest sending valid URLs to the service and then filtering at the response side.
We consider the services API to be a legacy endpoint and not to be relied on for future updates: embed.ly/docs/api/legacy/endpoints/1/service
I'm not quite sure where the fault for this lies, but here seems a good start.
Embedding a youtube playlist using embed.ly directly works okay: http://embed.ly/code?url=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLE2714DC8F2BA092D (literally an example playlist heh)
Running it thorough micawber doesn't embed anything using the URL: https://www.youtube.com/playlist?list=PLE2714DC8F2BA092D - using the embed URL of https://www.youtube.com/embed/videoseries?list=PLE2714DC8F2BA092D results in the first video in the series being embedded but no playlist controls.