我正在尝试使用 $tags 从 $username 获取 youtube 视频:
$tags='detskij-sad-198';
require_once('Zend/Loader.php');
Zend_Loader::loadClass('Zend_Gdata_YouTube');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
$authenticationURL = 'https://www.google.com/accounts/ClientLogin';
$httpClient = Zend_Gdata_ClientLogin::getHttpClient(
$username = 'Schoolkharkovua',
$password = '*****',
$service = 'youtube',
$client = null,
$source = '*****',
$loginToken = null,
$loginCaptcha = null,
$authenticationURL);
$devkey = '*****';
$yt = new Zend_Gdata_YouTube($httpClient, '', '', $devkey);
$yt->setMajorProtocolVersion(2);
$query = $yt->newVideoQuery();
$query->setMaxResults(4);
$query->setVideoQuery($tags); // also i tried $query->category = $tags;
$query->setAuthor($username);
$videoFeed = $yt->getVideoFeed($query->getQueryUrl(2));
$videoFeed 没有返回任何条目,尽管我知道 $username 有一个带有 $tags 的视频,并且此代码可以工作到 3 月中旬
如果我只通过 $username 或 $tags 进行查询 - 我会得到结果。我究竟做错了什么?
PS。如果我同时尝试通过“关键字”和“作者姓名”进行查询,http://gdata.youtube.com/demo/index.html也会返回空视频提要
Hhhhhmmmmm ......似乎“google”不再在标签中获得符号“-”
但
echo 'Tags: ' . implode(", ", $videoEntry->getVideoTags());
仍然是空的,youtube api 不返回视频标签!
请大家帮我从我的视频频道获取视频标签!