gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 06:24:57 24 4
gpt4 key购买 nike

我正在使用适用于.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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com