当播放列表项数超过 100 时,检索 youtube 播放列表错误 [英] Retrieve youtube playlist wrong when playlist items count over 100

查看:20
本文介绍了当播放列表项数超过 100 时,检索 youtube 播放列表错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论我使用的是 v2 还是 v3 api,我的播放列表项都是错误的.

I got playlist items wrong no matter v2 or v3 api I used.

测试播放列表在这里:test1113另一个测试播放列表

test playlists are here: test1113, and another test playlist

示例使用的是 test1113

the example is using test1113

当我调用https://gdata.youtube.com/feeds/api/playlists/PLLp2yjw6iubr0dAuhxmY15n3tqGYbI8BV?v=2&alt=json&start-index=1&max-results=25",它返回 25 个项目,从位置 1 到位置 26,位置 5 缺失.

When I call "https://gdata.youtube.com/feeds/api/playlists/PLLp2yjw6iubr0dAuhxmY15n3tqGYbI8BV?v=2&alt=json&start-index=1&max-results=25", it returns 25 items, from position 1 to position 26, with position 5 missing.

https://gdata.youtube.com/feeds/api/playlists/PLLp2yjw6iubr0dAuhxmY15n3tqGYbI8BV?v=2&alt=json&start-index=26&max-results=25 将位置 31 返回到位置 56.这导致 4 个视频丢失.

https://gdata.youtube.com/feeds/api/playlists/PLLp2yjw6iubr0dAuhxmY15n3tqGYbI8BV?v=2&alt=json&start-index=26&max-results=25 returns position 31 to position 56. This makes 4 videos missing.

从第 51 个视频调用到第 75 个视频甚至更糟.https://gdata.youtube.com/feeds/api/playlists/PLLp2yjw6iubr0dAuhxmY15n3tqGYbI8BV?v=2&alt=json&start-index=51&max-results=25

Call from 51st video to 75th video even worse. https://gdata.youtube.com/feeds/api/playlists/PLLp2yjw6iubr0dAuhxmY15n3tqGYbI8BV?v=2&alt=json&start-index=51&max-results=25

返回的第一个视频甚至不在播放列表中.最后返回的是位置88.(但根据返回的json文件,yt$位置是108.)

The first video returned is not even in the playlist. The last returned is position 88. (but according to the json file returned, the yt$position is 108.)

您可以调用 url,直到获得播放列表中的所有视频.但是只有80个,根据api,总结果应该是137个.从api调用,播放列表中的很多视频都丢失了.

You can call the url until you get all the videos in the playlist. But there is only 80 of them, according to the api, the total result should be 137. A lot of videos in the playlist are missing by calling from api.

v2 和 v3 api 返回相同的结果.

Both v2 and v3 api returns the same result.

我做错了什么?还是 YouTube 有问题?

What did I do wrong? Or Is there a problem with YouTube?

推荐答案

可能与这个 bug 报告有关:https://code.google.com/p/gdata-问题/问题/细节?id=6062也可以看看:youtube api playlistitems 删除的视频

Maybe related to this bug report: https://code.google.com/p/gdata-issues/issues/detail?id=6062 See also: youtube api playlistitems deleted videos

这篇关于当播放列表项数超过 100 时,检索 youtube 播放列表错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆