newVid-6ren">
gpt4 book ai didi

php - YouTube Gdata API使用$ yt-> newVideoQuery检索收藏夹

转载 作者:行者123 更新时间:2023-12-03 05:30:17 25 4
gpt4 key购买 nike

也许这是一个不常见的问题,但是我们开始吧。这是代码

$userName=("Google");
$yt = new Zend_Gdata_YouTube();

$query = $yt->newVideoQuery();
$query->setAuthor($userName);
$query->setMaxResults(3);
$query->setStartIndex(2);
printVideoFeed($yt->getVideoFeed($query));

而且效果很好。但我的客户也想包括他的收藏夹列表。

可以使用
printVideoFeed($yt->getUserFavorites($userName));

但是这样做,我无法控制分页。

有任何想法吗?

最佳答案

您不能使用$yt->getUserFavorites($userName);来检索用户的收藏夹吗?

或者,您可以使用JavaScript控制分页,计算dom元素的数量,然后执行逻辑

关于php - YouTube Gdata API使用$ yt-> newVideoQuery检索收藏夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1885084/

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