我們有一個網站一直在使用YouTube API爲視頻加載評論幾個月沒有問題。本週末,我們注意到,所有視頻中的評論文字都已消失!作者信息,publishdAt等都通過很好,但snippet.textDisplay是空白的每一個評論。如果我在YouTube.com上觀看該視頻,則評論無誤。對所有評論YouTube API textDisplay爲空
部分JSON回報:
{
"kind": "youtube#commentThreadListResponse",
"etag": "\"DsOZ7qVJA4mxdTxZeNzis6uE6ck/HnKLJJvaX5o82p7SOXqZoax63Pk\"",
"nextPageToken": "Cg0QvLX3nrHpygIgACgBEhQIAxDQibyJ2oDKAhiwy_Dp193CAhgCIBEo_dG1q83Pj81Z",
"pageInfo": {
"totalResults": 17,
"resultsPerPage": 20
},
"items": [
{
"kind": "youtube#commentThread",
"etag": "\"DsOZ7qVJA4mxdTxZeNzis6uE6ck/Fme5IvQu6tqWHp4YOLrYer7CIV0\"",
"id": "z12mcbxpbsvvvjpep22qufvxxsqiith5g04",
"snippet": {
"videoId": "1nFywcC37i0",
"topLevelComment": {
"kind": "youtube#comment",
"etag": "\"DsOZ7qVJA4mxdTxZeNzis6uE6ck/ldVLSDtTKPhMl-FtaJHj6FzFBxs\"",
"id": "z12mcbxpbsvvvjpep22qufvxxsqiith5g04",
"snippet": {
"authorDisplayName": "Tea Culture",
"authorProfileImageUrl": "https://lh3.googleusercontent.com/-gnq7syMNFPM/AAAAAAAAAAI/AAAAAAAABcY/GOY--FZpe0w/photo.jpg?sz=50",
"authorChannelUrl": "http://www.youtube.com/channel/UCLTjm6qRUveEL2-q0UcFjWQ",
"authorChannelId": {
"value": "UCLTjm6qRUveEL2-q0UcFjWQ"
},
"videoId": "1nFywcC37i0",
"textDisplay": "",
"authorGoogleplusProfileUrl": "https://plus.google.com/113856310904021846289",
"canRate": false,
"viewerRating": "none",
"likeCount": 1,
"publishedAt": "2015-12-29T08:58:47.729Z",
"updatedAt": "2015-12-29T08:58:47.729Z"
}
},
"canReply": false,
"totalReplyCount": 0,
"isPublic": true
}
},
{
"kind": "youtube#commentThread",
"etag": "\"DsOZ7qVJA4mxdTxZeNzis6uE6ck/74T1pezkd-XvwRlS2TdnS55rMLU\"",
"id": "z12egnvgnxubg1fcz23njpizuseusp52v",
"snippet": {
"videoId": "1nFywcC37i0",
"topLevelComment": {
"kind": "youtube#comment",
"etag": "\"DsOZ7qVJA4mxdTxZeNzis6uE6ck/Qo_wbi2gLLivL4wxv762XrTrOTc\"",
"id": "z12egnvgnxubg1fcz23njpizuseusp52v",
"snippet": {
"authorDisplayName": "speeedskater",
"authorProfileImageUrl": "https://lh6.googleusercontent.com/-vfRKsopq1lU/AAAAAAAAAAI/AAAAAAAAABM/L0ASWMo0cAg/photo.jpg?sz=50",
"authorChannelUrl": "http://www.youtube.com/channel/UCsb8wbZeHZTta_yZ_YN1mag",
"authorChannelId": {
"value": "UCsb8wbZeHZTta_yZ_YN1mag"
},
"videoId": "1nFywcC37i0",
"textDisplay": "",
"authorGoogleplusProfileUrl": "https://plus.google.com/113292370824207410602",
"canRate": false,
"viewerRating": "none",
"likeCount": 0,
"publishedAt": "2015-12-03T05:25:02.538Z",
"updatedAt": "2015-12-03T05:25:02.538Z"
}
},
"canReply": false,
"totalReplyCount": 0,
"isPublic": true
}
},
...
有幾個bug報告,似乎符合這個問題(和時間)。例如,#7969 https://code.google.com/p/gdata-issues/issues/detail?id=7969。解決方法似乎是將textFormat用作plainText,但這顯然不理想! – theduck
謝謝,theduck! –