1
我想在從YouTube上檢索視頻評論時更改最大結果。這是我的代碼:com.google.gdata.util.InvalidEntryException當max-results在URL中時
YouTubeService service = new YouTubeService(
"CLIENT_ID");
String str="http://gdata.youtube.com/feeds/api/videos/"+videoId;
YouTubeQuery youtubeQuery = new YouTubeQuery(new URL(
str));
youtubeQuery.setMaxResults(50);
youtubeQuery.setStartIndex(1);
String videoEntryUrl = youtubeQuery.getUrl().toString();
System.out.println(videoEntryUrl+" *************");
VideoEntry videoEntry = service.getEntry(new URL(videoEntryUrl),
VideoEntry.class);
在創建最後一排的VideoEntry對象,它給出了這樣的錯誤:在線程「主要」 com.google.gdata.util.InvalidEntryException
例外:'最大結果參數不支持此資源 http://schemas.google.com/g/2005'>GData
unsupportedQueryParam
的‘最大結果’參數不支持此資源
我的代碼當它打印查詢時,艾夫斯錯誤查詢是這樣的:
http://gdata.youtube.com/feeds/api/videos/v_wzBsZLLaE?start-index=1&max-results=40
爲什麼max-results參數在這種情況下,不支持?
問候