<small id='xX4SV'></small><noframes id='xX4SV'>

    <tfoot id='xX4SV'></tfoot>

    <legend id='xX4SV'><style id='xX4SV'><dir id='xX4SV'><q id='xX4SV'></q></dir></style></legend>
      <bdo id='xX4SV'></bdo><ul id='xX4SV'></ul>
  1. <i id='xX4SV'><tr id='xX4SV'><dt id='xX4SV'><q id='xX4SV'><span id='xX4SV'><b id='xX4SV'><form id='xX4SV'><ins id='xX4SV'></ins><ul id='xX4SV'></ul><sub id='xX4SV'></sub></form><legend id='xX4SV'></legend><bdo id='xX4SV'><pre id='xX4SV'><center id='xX4SV'></center></pre></bdo></b><th id='xX4SV'></th></span></q></dt></tr></i><div id='xX4SV'><tfoot id='xX4SV'></tfoot><dl id='xX4SV'><fieldset id='xX4SV'></fieldset></dl></div>

    1. 从 curl 或 get_video_info 获取 youtube 视频 URL

      时间:2023-10-10
          <tbody id='QB42p'></tbody>
        <legend id='QB42p'><style id='QB42p'><dir id='QB42p'><q id='QB42p'></q></dir></style></legend>
          <tfoot id='QB42p'></tfoot>
          <i id='QB42p'><tr id='QB42p'><dt id='QB42p'><q id='QB42p'><span id='QB42p'><b id='QB42p'><form id='QB42p'><ins id='QB42p'></ins><ul id='QB42p'></ul><sub id='QB42p'></sub></form><legend id='QB42p'></legend><bdo id='QB42p'><pre id='QB42p'><center id='QB42p'></center></pre></bdo></b><th id='QB42p'></th></span></q></dt></tr></i><div id='QB42p'><tfoot id='QB42p'></tfoot><dl id='QB42p'><fieldset id='QB42p'></fieldset></dl></div>
          • <bdo id='QB42p'></bdo><ul id='QB42p'></ul>

              • <small id='QB42p'></small><noframes id='QB42p'>

                本文介绍了从 curl 或 get_video_info 获取 youtube 视频 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                所以,我正在开发一个 php 项目,其中一部分是抓取 youtube 视频 url 并将其插入到 html5 视频标签中.我使用 curl 调用 http://youtube.com/get_video_info?video_id=XXX 并获取正确的视频文件我本地机器上的网址.

                So, I am working on a php project and one part of it is grabbing a youtube video url and inserting it into an html5 video tag. I was using a curl call to http://youtube.com/get_video_info?video_id=XXX and getting the right video file urls on my local machine.

                但是,当我将代码上传到我的网络服务器并尝试运行它时,没有一个视频 URL 有效.网址看起来不错,但有些参数(如 IP)有所不同.我不明白为什么它可以在运行 xampp 或 mamp 的本地机器上运行,但不能在我的 Web 服务器上运行.我什至尝试在 youtube 视频页面上做一个卷曲,并注意到在本地,它会输出页面并播放视频,但在我的网络服务器上,所有视频通话都有 404.

                But, when I uploaded my code to my web server and tried to run it, none of the video URLs have worked. The urls seemed fine but some parameters, like IP, where different. I can't understand why it works from my local machine running xampp or mamp but not on my web server. I even tried just doing a curl on the youtube video page and noticed that locally, it would output the page and play the video but on my webserver, all the video calls got 404s.

                有这方面的信息吗?无论如何,我可以获取一个 youtube 视频网址,以便我可以在 html5 视频标签中播放 youtube 视频?这就是 keepvid 和类似网站使用该死的 Java 小程序的原因吗?

                Any info about this? Anyway I can grab a youtube video url so that I can play youtube videos in a html5 video tag? Is this why keepvid and sites like that use the damn java applet?

                推荐答案

                你应该看看 youtube-dl 项目 我很确定您可以通过一些想法来理解实现目标的正确方法.

                You should take a look to youtube-dl project I'm pretty sure you can takes some idea to understand the proper way to achieve your goal.

                这篇关于从 curl 或 get_video_info 获取 youtube 视频 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:使用 PHP 下载 Youtube 视频 下一篇:如何使用 youtube api 从播放列表中获取所有视频?

                相关文章

                  <bdo id='u40wI'></bdo><ul id='u40wI'></ul>
                1. <small id='u40wI'></small><noframes id='u40wI'>

                2. <i id='u40wI'><tr id='u40wI'><dt id='u40wI'><q id='u40wI'><span id='u40wI'><b id='u40wI'><form id='u40wI'><ins id='u40wI'></ins><ul id='u40wI'></ul><sub id='u40wI'></sub></form><legend id='u40wI'></legend><bdo id='u40wI'><pre id='u40wI'><center id='u40wI'></center></pre></bdo></b><th id='u40wI'></th></span></q></dt></tr></i><div id='u40wI'><tfoot id='u40wI'></tfoot><dl id='u40wI'><fieldset id='u40wI'></fieldset></dl></div>
                3. <tfoot id='u40wI'></tfoot>
                  <legend id='u40wI'><style id='u40wI'><dir id='u40wI'><q id='u40wI'></q></dir></style></legend>