我希望我的查询结果只是短于例如7分钟的视频。这有可能吗?
目前我使用的是:
$yt = new Zend_Gdata_YouTube();
$yt->setMajorProtocolVersion(2);
$query = $yt->newVideoQuery();
$query->setOrderBy('relevance');
$query->setSafeSearch('none');
$query->setVideoQuery($searchTerms);
// Note that we need to pass the version number to the query URL function
// to ensure backward compatibility with version 1 of the API.
$videoFeed = $yt->getVideoFeed($query->getQueryUrl(2));文档上说,有一个"duration“参数:https://developers.google.com/youtube/2.0/reference?hl=de#durationsp
但不幸的是我不太走运
$query->setDuration('short');但这无论如何都不会做到这一点,而它寻找的视频短于4分钟。
有什么想法吗?
克里斯
发布于 2012-08-11 20:37:57
我想你可能想试试$query->setSeconds(240);
我找到了信息:Zend_Gdata_YouTube_Extension_Duration和Interacting with Gdata
祝好运。
https://stackoverflow.com/questions/11909077
复制相似问题