gpt4 book ai didi

php - PHP的Youtube API引用代码?

转载 作者:行者123 更新时间:2023-12-03 06:31:44 25 4
gpt4 key购买 nike

寻找允许获取视频发布日期的对象。
我阅读了Google Youtube API文档,但在那堆困惑中找不到任何内容:(

我使用V2句子:

$v->getVideoTitle();

似乎很容易使用 $v->getVideoDate();$v->getVideoPublished();但是不能用...

Some1可以帮助我吗?

干杯!

最佳答案

如果您在下面的链接上使用给定的[video_id]进行HTTP GET,它将仅返回包含部分请求(在这种情况下为“已发布”)的XML响应。

http://gdata.youtube.com/feeds/api/videos?v=[video_id]&max-results=1&fields=entry(published)&prettyprint=true

结果将是这样。
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'>
<entry>
<published>2013-10-30T04:28:45.000Z</published>
</entry>
</feed>

这对您有帮助吗?

关于php - PHP的Youtube API引用代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19794206/

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