检索YouTube的播放迪斯科 [英] Retrieving a YouTube Disco playlist

查看:173
本文介绍了检索YouTube的播放迪斯科的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

YouTube有 创建一些起点关键字智能播放列表这个很酷的事情。我想以编程方式访问播放列表。我发现 YouTube数据API 但它不 ŧ讨论迪斯科的功能。

YouTube has this cool thing that creates a "smart playlist" from some starting keywords. I would like to programmatically access the playlist. I've found the YouTube data API but it doesn't discuss the "disco" feature.

答案之一下面使用提示

http://www.youtube.com/disco?action_search=1&query=XXXXXXXXX

这会返回一些JSON与第一视频播放,以及列表属性。不幸的是,列表是一个32字符的十六进制字符串,而正常的播放列表ID是16个字符的十六进制字符串。这意味着,标准数据API检索完整的播放列表不工作

that will return some JSON with the first video to be played, and a list property. Unfortunately, the list is a 32-character hex string, whereas normal playlist ID's are 16-character hex strings. This means that the standard data API to retrieve the full playlist doesn't work.

有什么建议?

推荐答案

首先,我必须说我我从来没有使用YouTube数据API,所以我不知道下面的信息是多么有用将。

First, I must say I I never used youtube data API, so I don't know how useful below information will be.

让我用一个例子:

我想创造非凡的南瓜。我键入艺术家名称,点击迪斯科!按钮。使用 Fiddler2 我想通了请求的URL是:

I wanted to create Smashing Pumpkins. I typed the artist name and clicked the "Disco!" button. Using Fiddler2 I figured out the requested url was:

www.youtube.com/disco?action_search=1&query=smashing%20pumpkins

注意,即空间与替换%20 。作为回应,我得到简单的JSON响应:

Notice, that spaces are replaced with %20. As a response i got simple JSON response:

{"url": "\/watch?v=bhMz7x1ZaGM\u0026feature=disco\u0026playnext=1\u0026list=MLGxdCwVVULXe5-F4X_zm6wnblRsnXoPJS"}

这是新生成的碎瓜播放列表的第一首歌曲,这是地址列表= MLGxdCwVVULXe5-F4X_zm6wnblRsnXoPJS 的链接。所有您需要知道的是更换 \\ u0026 &放大器; ,你会得到一个有效的链接

It was a link to the first song of freshly generated Smashing Pumpkins playlist, which address was list=MLGxdCwVVULXe5-F4X_zm6wnblRsnXoPJS. All you have to do know is replacing \u0026 with & and you get a valid link.

我假设你想要做剩下的法宝是通过官方YouTube数据API可用。
我希望我的研究将帮助你。

I assume the rest magic you want to do is available via official youtube data API. I hope my research will help you.

修改

好了,它看起来像由YouTube产生该播放列表/迪斯科是不是同一类型的播放列表,用户可以生成并通过API可用。列表ID超过usuall长,当你点击播放列表有关的详细信息您将被重定向到艺术家的个人资料。在此基础上两个事实,我想这是不可能通过API以检索生成的列表。对不起。

Well, it looks like this playlist generated by youtube/disco is not the same type of playlist that users can generate and that is available via API. The list ID is longer than usuall and when you click "More info about playlist" you are redirected to artists profile. Based on this two facts, i guess it's impossible to retrive generated lists via API. Sorry.

这篇关于检索YouTube的播放迪斯科的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆