api - 如何在Youtube API中搜索知识共享[C#,.Net]

标签 api youtube

我正在使用适用于.Net的Youtube APi 3.0和此[代码示例] [1]。一切正常,但我不知道如何搜索CC。

        var searchListRequest = youtubeService.Search.List("snippet");
        searchListRequest.Q = "Google"; 
        searchListRequest.VideoLicense = SearchResource.ListRequest.VideoLicenseEnum.CreativeCommon;
        searchListRequest.MaxResults = 50;

https://developers.google.com/youtube/v3/code_samples/dotnet#search_by_keyword

最佳答案

答案很简单...

var searchListRequest = youtubeService.Search.List("snippet");
        searchListRequest.Type = "video";
        searchListRequest.Q = searchword; // Replace with your search term.
        searchListRequest.VideoLicense = SearchResource.ListRequest.VideoLicenseEnum.CreativeCommon;
        searchListRequest.MaxResults = 50;

关于api - 如何在Youtube API中搜索知识共享[C#,.Net],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28238137/

相关文章:

.net - 部署在本地 IIS 中时,azure 消息传递服务未接收消息

javascript - youtube 如何防止从其 HTML5 播放器下载视频?

android - 怎么把Youtube URL转换成RTSP URL?

jquery - 使用基本 json 获取 twitter api

c# - google places api 帮助 c#

api - 在 Google Spreadsheet API 上获取合并单元格宽度

android - Youtube 与其他网络共享 - 原生还是 webview?

机器学习模型的API设计

php - php-如何从随机YouTube视频ID列表中生成YouTube视频列表?

javascript - Uncaught Error : Error calling method on NPObject Error with embedded Youtube Video