这是获取数据的代码:
YouTube youtube = new YouTube.Builder(new NetHttpTransport(), new JacksonFactory(), new HttpRequestInitializer() {
public void initialize(HttpRequest request) throws IOException {}
}).setApplicationName("youtube-channel-fetcher").build();
String artist = "";
try{
artist = youtube.videos().list("snippet").setId(ytID).setKey(Utils.getYouTubeKey()).setFields("items(snippet/channelTitle)").execute().getItems().get(0).getSnippet().getChannelTitle();
} catch (ArrayIndexOutOfBoundsException ignored){}
作为回应,我收到以下错误:
"code" : 403,
"errors" : [ {
"domain" : "usageLimits",
"message" : "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"reason" : "dailyLimitExceededUnreg",
"extendedHelp" : "https://code.google.com/apis/console"
} ],
"message" : "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
答案 0 :(得分:0)