首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Python:在youtube上搜索播放列表

Python:在youtube上搜索播放列表
EN

Stack Overflow用户
提问于 2010-10-05 02:08:17
回答 1查看 1.2K关注 0票数 0

有没有办法使用gdata-python-client在youtube上搜索播放列表?至于文档,这是不可能的,但可能会有一些变通办法...

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-10-05 04:29:48

you tube python API似乎有一种搜索匹配特定术语的播放列表的方法。根据文档,API具有检索与用户指定的搜索项匹配的播放列表的能力。

  • http://code.google.com/apis/youtube/2.0/developers_guide_protocol_playlist_search.html

编辑: Curl输出

我刚刚使用了curl,API似乎工作得很好。

代码语言:javascript
复制
~ $ curl 'http://gdata.youtube.com/feeds/api/playlists/snippets?q=soccer&start-index=11&max-results=10&v=2'

输出:

代码语言:javascript
复制
<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/&quot;C0cHRX85eCp7ImA9Wx5VEko.&quot;'><id>tag:youtube.com,2008:playlists:snippets</id><updated>2010-10-05T09:30:34.120Z</updated><category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#playlistLink'/><title>YouTube Playlists matching query: soccer</title><logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/playlists/snippets?v=2'/><link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/playlists/snippets/batch?v=2'/><link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/playlists/snippets?q=soccer&amp;start-index=11&amp;max-results=10&amp;v=2'/><link rel='service' type='application/atomsvc+xml' href='http://gdata.youtube.com/feeds/api/playlists/snippets?alt=atom-service&amp;v=2'/><link rel='previous' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/playlists/snippets?q=soccer&amp;start-index=1&amp;max-results=10&amp;v=2'/><link rel='next' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/playlists/snippets?q=soccer&amp;start-index=21&amp;max-results=10&amp;v=2'/><author><name>YouTube</name><uri>http://www.youtube.com/</uri></author><generator version='2.0' uri='http://gdata.youtube.com/'>YouTube data API</generator><openSearch:totalResults>1241773</openSearch:totalResults><openSearch:startIndex>11</openSearch:startIndex><openSearch:itemsPerPage>10</openSearch:itemsPerPage></feed>~ $ 
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3857917

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档