如何将 YouTube 播放列表解析为 ListView

发布于 2024-12-07 11:38:29 字数 352 浏览 5 评论 0原文

我有一个 GDATA 链接,其中包含来自公共 YouTube 频道的播放列表。我需要此播放列表的视频显示在列表视图中。这可能吗?如果是os,我该如何实现呢?有人能给我举个例子吗?

编辑:

这是我需要解析的gdata链接:

http://gdata .youtube.com/feeds/base/users/interactivemedialab1/playlists/42E77F93E83D3FE4

I have a GDATA link that contains a playlist from a public YouTube Channel. I need the videos of this playlist to appear in a listview. Is this possible? If os, how can I implement it? Could someone point me towards an example?

EDIT:

Here is the gdata link I need to parse:

http://gdata.youtube.com/feeds/base/users/interactivemedialab1/playlists/42E77F93E83D3FE4

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

攀登最高峰 2024-12-14 11:38:29

看一下我的示例 Android 应用程序,用于在列表视图中显示 YouTube 播放列表。

https://github.com/akoscz/YouTubePlaylist

请注意,您必须拥有此示例的有效 API 密钥申请工作。您可以使用 Google 开发者控制台注册您的应用程序并启用 YouTube 数据 API。您需要注册 Web 应用程序而不是 Android 应用程序,因为此示例应用程序使用的 API 密钥是“浏览器密钥”。

Take a look at my sample Android application for displaying a YouTube playlist in a list view.

https://github.com/akoscz/YouTubePlaylist

Note that you MUST have a valid API key for this sample application to work. You can register your application with the Google Developer Console and enable the YouTube Data API. You need to Register a Web Application NOT an Android application, because the API key that this sample app uses is the "Browser Key".

八巷 2024-12-14 11:38:29

要创建列表,请尝试搜索 API 演示,那里有大量列表视图示例以及您可以使用的代码。正如 LeiNaD 正确指出的那样,首先使用 XMLPullParser 或 XMLSAXParser 解析 XML。

For creating a list try searching the API Demos, loads of list view example there with code you can use. And as LeiNaD rightly pointed out first parse the XML using XMLPullParser or XMLSAXParser.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文