gpt4 book ai didi

php - YouTube取回/嵌入

转载 作者:行者123 更新时间:2023-12-03 06:28:00 27 4
gpt4 key购买 nike

有没有一种可能的方式,我可以从youtube检索我的最新视频的列表(带有缩略图),使用cron作业将嵌入的代码存储在数据库中,这样我就可以在单独的页面上显示视频,而不是将用户引向youtube观看视频? (全部在php中)

最佳答案

您可以尝试查看此页面:https://developers.google.com/youtube/v3/

Google写道:

You can use the API to fetch search results and to retrieve, insert, update, and delete resources like videos or playlists.



我看到PHP API仍处于beta版本,但您可以尝试一下。您必须注册您的应用程序以获得使用API​​的凭据。在developers.google上,有很多文档和一些示例( https://developers.google.com/youtube/v3/code_samples/php#retrieve_my_uploads)

使用API​​,您无需检索代码并将其存储到数据库中,就可以直接在Web应用程序中显示视频。我希望这是您想要的,如果有帮助,请告诉我!

路卡

关于php - YouTube取回/嵌入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23830023/

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