脚本宝典收集整理的这篇文章主要介绍了Youtube API下载标题(使用PHP示例),脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
如果我在没有CC贡献的情况下尝试来自视频的曲目ID,我会得到正确的错误:
我已经尝试在$youtube-> captions->下载中排除第二个可选参数,但没有运气.
当它试图打印$captionResource时它会中断(我是调试PHP的新手)
//(original From Youtube API examples) function downloadCaption(GOOGLE_Service_YouTube $youtube,$captionId,&$htMLBody) { // Call the YouTube Data API's captions.download method to download an existing caption. $captionResouce = $youtube->captions->download($captionId,array( 'tfmt' => "srt",'alt' => "media" )); $htmlBody .= "<h2>Downloaded caption track</h2><ul>"; $htmlBody .= sPRintf('<li>%s</li>',$captionResouce); $htmlBody .= '</ul>'; }
以上是脚本宝典为你收集整理的Youtube API下载标题(使用PHP示例)全部内容,希望文章能够帮你解决Youtube API下载标题(使用PHP示例)所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。